Improve performance of Merge Request Changes API under load into S3 tier
After correcting an issue in our performance testing with the Merge Request Changes API we've discovered that it's performing badly:
* Environment: 10k
* Environment Version: 13.2.0-pre `744484487f2`
* Option: 60s_200rps
* Date: 2020-06-30
* Run Time: 1m 6.12s (Start: 11:21:04 UTC, End: 11:22:10 UTC)
* GPT Version: v2.0.3
NAME | RPS | RPS RESULT | TTFB AVG | TTFB P90 | REQ STATUS | RESULT
-----------------------------------------------------|-------|--------------------|-----------|----------------------|----------------|----------------
api_v4_projects_merge_requests_merge_request_changes | 200/s | 25.87/s (>16.00/s) | 6314.72ms | 7940.54ms (<12000ms) | 100.00% (>95%) | Passed
The test was run against the 10k Reference Architecture at the target RPS of 200/s. It's run against a large MR within the gitlabhq
project which shows as it has 678+ changes.
As it stands the endpoint is breaching our new performance targets this endpoint is currently over our target of 500ms and falls into the ~S2 tier.
Task is to reduce the performance of this endpoint to the next tier of ~S3 (<2000ms).