Improve performance of show.json action (rendered) for Projects::BlobController under load into the s4 tier
Create team has made a great improvement to the Projects::BlobController#show.json
controller and action, it went down from 2.2s to under 1.2s for rendered files (files that are shown with the viewer=rich
param, e.g. markdown files):
█ Results summary
* Environment: 10k
* Environment Version: 14.0.0-pre `c6e57e5aa5c`
* Option: 60s_200rps
* Date: 2021-06-02
* Run Time: 1h 27m 8.43s (Start: 04:35:44 UTC, End: 06:02:52 UTC)
* GPT Version: v2.8.0
NAME | RPS | RPS RESULT | TTFB AVG | TTFB P90 | REQ STATUS | RESULT
---------------------------|-------|----------------------|-----------|-----------------------|----------------|--------
web_project_file_rendered | 20/s | 15.83/s (>9.60/s) | 892.91ms | 1290.67ms (<3000ms) | 100.00% (>99%) | Passed
█ Web - Project File Rendered
data_received.................................: 921 MB 15 MB/s
data_sent.....................................: 133 kB 2.2 kB/s
group_duration................................: avg=2333.02ms min=762.83ms med=1852.08ms max=12618.94ms p(90)=2754.09ms p(95)=3513.36ms
http_req_blocked..............................: avg=0.08ms min=0.00ms med=0.01ms max=5.78ms p(90)=0.01ms p(95)=0.03ms
http_req_connecting...........................: avg=0.06ms min=0.00ms med=0.00ms max=2.12ms p(90)=0.00ms p(95)=0.00ms
http_req_duration.............................: avg=897.49ms min=333.33ms med=671.49ms max=12566.12ms p(90)=1291.74ms p(95)=1628.77ms
{ expected_response:true }..................: avg=897.49ms min=333.33ms med=671.49ms max=12566.12ms p(90)=1291.74ms p(95)=1628.77ms
http_req_failed...............................: 0.00% ✓ 0 ✗ 962
http_req_receiving............................: avg=4.53ms min=0.47ms med=4.43ms max=26.75ms p(90)=8.61ms p(95)=10.39ms
http_req_sending..............................: avg=0.04ms min=0.02ms med=0.04ms max=0.16ms p(90)=0.06ms p(95)=0.08ms
http_req_tls_handshaking......................: avg=0.00ms min=0.00ms med=0.00ms max=0.00ms p(90)=0.00ms p(95)=0.00ms
http_req_waiting..............................: avg=892.91ms min=331.95ms med=664.67ms max=12549.34ms p(90)=1290.67ms p(95)=1605.97ms
✓ { endpoint:file?format=json&viewer=rich }...: avg=1337.58ms min=630.18ms med=723.83ms max=12549.34ms p(90)=1605.87ms p(95)=2415.08ms
✓ { endpoint:file }...........................: avg=448.25ms min=331.95ms med=372.92ms max=3527.27ms p(90)=575.70ms p(95)=672.74ms
✓ http_reqs.....................................: 962 15.831609/s
✓ { endpoint:file?format=json&viewer=rich }...: 481 7.915804/s
✓ { endpoint:file }...........................: 481 7.915804/s
iteration_duration............................: avg=2328.20ms min=0.14ms med=1851.70ms max=12619.02ms p(90)=2753.71ms p(95)=3511.30ms
iterations....................................: 481 7.915804/s
✓ successful_requests...........................: 100.00% ✓ 962 ✗ 0
vus...........................................: 2 min=2 max=20
vus_max.......................................: 20 min=20 max=20
The test was done against a "worse case" file, CHANGELOG.md, (~770kb).
As part of the performance targets this page now falls into the severity3 tier.
Task is to reduce the performance of this page to the next tier of severity4 (<1000ms).
Edited by Nailia Iskhakova