Page MenuHomePhabricator

Consider removing Modern or CologneBlue for performance reasons
Closed, DeclinedPublicBUG REPORT

Description

With the introduction of Vector 22 we have gone from 6 production skins to 7 [1] (Vector-22, Vector, Monobook, Timeless, Modern, CologneBlue, Minerva). That's a 15% increase. This means in addition to temporarily having cold caches for pilot wikis, it's also a possibility that as we add more wikis, we may reach a threshold where caches will perform worse for everyone as there are now more values overall competing for popularity and survival within the same cache memory. To monitor this, the performance team would recommend comparing flame graphs from week to week (for index.php Skin rendering) and keeping an eye on backend pageview time in Grafana [2] and look out for any sustained regressions.

  • While it may prove unpopular Modern and CologneBlue are the obvious candidates for removal if we were to remove one. For code complexity reasons CologneBlue would be the more attractive one to remove.
  • We may want to consider code-ifying an upper limit on skins to make sure no new skins are added to production.

[1] Note: This ignores the internal skins for ContentTranslation, Fallback skin and SkinApi
[2] https://grafana.wikimedia.org/d/000000429/backend-save-timing-breakdown

Event Timeline

It's not obvious, but the text in the task description (apart from the two bullet points) was actually written by me in a perfomance-team@ email to Jon, and copied here verbatim. The context of that email was change 757733 for T299927, which would start changing the value of wgDefaultSkin for the first time in over ten years, and the question was for us to share what areas to look out for in terms performance impact.

I would classify these caching concerns as invalid in the repurposed context in which they are presented here on this task. There is a big difference between assessing deployment risks (short-term concerns, areas to monitor for potentially unknown defects or other unforeseen consequences) and long-term sustainability.

The semantics of LRU caching (selection based on popularity) means that rare skins have effectively zero impact on cache performance. As such, after the initial transition, the default popularity will shift and there should be no actual net-increase in cache demand. More generally, each skins has generally a relatively small footprint in our caching backend. If they don't, then that's a problem we need to fix, or is something we could allocate more storage capacity to if the way the skin system works is being changed such that it requires that kind of capacity. No problem.

As I understand it, no alarm bells were rung, so in all likelihood skins do indeed represent only a very tiny proportion of cache values, and this imho cannot be used as a technical reason for preferring fewer deployed skins.

To put it another way: Even if we removed all other skins, I would still bring up caching as a concern in much the same way.