Improve performance of Branches List API when under load
Summary
In #30536 (closed), we were able to reduce the response from the branches list API from 5.8 seconds to 2.9 seconds. However, performance of the environment still degrades when the Branches API is tested at load.
Using the latest 10k results as a record of performance, we now want to iterate on the performance and get this response down to between 1000ms and 2000ms. Our ultimate goal will be to respond in under 500ms, but this will require iteration.
Useful information
- You can view Branches#index in Grafana here
- You can use the GitLab Performance Tool by running this command:
./run-k6 -e environments/10k.json -s scenarios/60s_200rps.json -t tests/api/api_v4_projects_repository_branches.js
- You can find a
stackprof
sample here
Steps to Reproduce
- If wanting to test against your own environment you can do. this by following the setup instructions of the Quality team's GitLab Performance Tool here - https://gitlab.com/gitlab-org/quality/performance/-/blob/master/docs/README.md
- After performing all the necessary prep as per the documentation above you can run the specific test by passing it's name via the tests command line option -
api_v4_projects_repository_branches
. A good RPS to start with for a local install is 20. - Alternatively you can reach out to the Quality team who can run the test against their certified 10k environment.
Edited by Grant Young