Page MenuHomePhabricator

Investigate load.php backend latency and minify-calls regression (November 2019)
Closed, ResolvedPublic

Description

The backend "avg minify calls/request" metric has been firing its alert on and off throughout the holidays. Time to investigate.

The latencies are elevated as well, though its alert is not (yet) consistently firing. But the fact that it is elevated is reason to take it seriously as it rules out internal changes that merely led to more frequent re-minification. E.g. something big could've been split in two that still consume the same amount of time (roughly) to minify, but that appears not the case.

See also:

I've updated the Grafana alert to only fire now if the rule is violated for 3 hours continuously. Noting here to (hopefully) remember to turn this off again once fixed.

General perf wins and mitigations to counter this regression:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Krinkle triaged this task as Medium priority.
Krinkle moved this task from Inbox, needs triage to Doing (old) on the Performance-Team board.

Ref T242478: Production load.php spends ~ 10% time doing output compression within PHP.

The start dates don't align, but it's big enough that we might as well tackle that first.

The other major thing right now is T187154: Performance regression from Apcu/ExtensionRegistry::loadFromQueue on PHP7.

The ExtensionRegistry call to ApcuBagOStuff::doGet alone is taking up 15% of the cpu time:

capture.png (2,386×983 px, 230 KB)

Krinkle changed the task status from Open to Stalled.Jan 10 2020, 11:50 PM
Krinkle moved this task from Doing (old) to Blocked (old) on the Performance-Team board.
Krinkle raised the priority of this task from Medium to High.Jan 11 2020, 1:27 AM

I've updated the Grafana alert to only fire now if the rule is violated for 3 hours continuously. Noting here to (hopefully) remember to turn this off again once fixed.

Krinkle updated the task description. (Show Details)

Alright, ready to call this resolved.

As of this week (dashboard permalink), the p95 is back around 200ms with peaks upto 250ms, which is a huge drop from the 350ms+ we had been on since Nov 2019.

Screenshot 2020-03-06 at 00.04.54.png (1,368×658 px, 138 KB)