Page MenuHomePhabricator

Determine cause of 20% increase in minify/req since 15 Oct 2020 (alert)
Closed, ResolvedPublic

Assigned To
Authored By
Krinkle
Oct 23 2020, 6:31 PM
Referenced Files
F34152311: cap.png
Mar 11 2021, 6:41 PM
F34152363: cap.png
Mar 11 2021, 6:41 PM
F34152397: cap.png
Mar 11 2021, 6:41 PM
F32425012: Screenshot 2020-11-02 at 19.29.46.png
Nov 2 2020, 7:30 PM
F32411965: graph.png
Oct 23 2020, 6:31 PM
Subscribers

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Krinkle renamed this task from Determine caue of 20% increase in minify/req rate to Determine cause of 20% increase in minify/req rate.Oct 23 2020, 6:31 PM
Krinkle renamed this task from Determine cause of 20% increase in minify/req rate to Determine cause of 20% increase in minify/req rate (alert).Nov 2 2020, 7:26 PM

Temporarily ack'ed/raised alert until this is figured out.

Screenshot 2020-11-02 at 19.29.46.png (1,344×714 px, 148 KB)

Krinkle renamed this task from Determine cause of 20% increase in minify/req rate (alert) to Determine cause of 20% increase in minify/req since 15 Oct 2020 (alert).Mar 11 2021, 4:45 PM
Krinkle claimed this task.

15 Oct 2020, and the increase has stayed with us since then.

  • Alert metric: avg minify calls per load.php request.
  • Observed change: increase from 40-50/req to 60/req.

Breaking down the alert aggregate (which is a rate per request) into separate metrics (rates per second for requests, and rates per second for various minification functions), we see that the thing that increased is indeed the number of minification invocations. This is useful to confirm as sometimes it might be a false alarm due to an optimisation where we make some small requests obsolete and thus raise the average minifications per request without actually being any negative effect. But alas, this is a "regular" regression that the metric is meant to catch. Specifically, a near 100% increase in JS minifications:

cap.png (1,935×1,307 px, 261 KB)

  • Metric: js minify per sec
  • Observed change: from 2K/s to 3-4K/s

Looking at https://www.mediawiki.org/wiki/MediaWiki_1.36/Roadmap, that was the day branch 1.36.0-wmf.13 rolled out to all Wikipedias. And according to https://sal.toolforge.org/production?p=0&q=wmf.13&d=2020-10-15, that did indeed happen on that day as planned.

The observed change aligns with the wikiversions deployment around 18:00 UTC, shown via the deployment annotation in Grafana.

cap.png (2,799×1,317 px, 223 KB)

OK, so to explain the increase in minifications, I'm looking for changes either to centralised logic (within resourceloader or things influencing it) or in specific features that may have started to register, split, or load more often their JavaScript modules, or broke/reduced CDN cacheability of load.php requests bundling those modules.

Looking at the Startup manifest dashboard in Grafana which would have seen new modules being added, but this branch actually decreased the overall number of modules in the manifest:

cap.png (2,535×1,402 px, 150 KB)

It might be that the registration was local to a specific target (T127268), but overall it looks like it might be something else then, e.g. loading modules more often or breaking their cachability. The change log at https://www.mediawiki.org/wiki/MediaWiki_1.36/wmf.13 contains 234 commits. Combing through that, I looked at the following in more detail:

  • CheckUser
    • git #a7f9f519 - Merge modules of CheckUser, Investigate and InvestigateBlock special pages (task T263540) by Amir Sarabadani
  • WikibaseLexeme
    • git 54c18251 - Replace script injections with ResourceLoader template loading (task T198455) by Noa wmde
  • VisualEditor
    • git #dccfd082 - Update UnicodeJS to v13.0.1 by James D. Forrester

I reviewed these in detail but could not find any cause for the increase. Since it didn't affect latency, I'll close this for now and just accept that we're doing significantly more minifications.