The mission of Wikimedia Performance is for our sites to transcend socioeconomic barriers
around reliable and fast access to find and contribute knowledge. We provide tools and
expertise to empower developers, and directly inform or undertake high-yield engineering
projects. [1][2]
The below is a periodic introduction and summary of recent changes to our guides. If you
haven't read these before, or if it's been more than six months, I recommend
taking a fresh look. Especially if you work on frontend or backend components in a
MediaWiki extension or MediaWiki core.
== *Current best practices* ==
The practices guides help set direction. Use them to guide new developments, or to
identify areas for improvement in current code. If you're short on time, focus on the
"Getting started" section atop each guide.
*Frontend*:
https://wikitech.wikimedia.org/wiki/Performance/Guides/Frontend_performance…
* The introduction details the principles that drive our platform's architecture, and
how to get the most out of it.
* Changed: The CSS "@embed" optimisation is now only recommended for very small
icons (up to 0.3KB). The guide explains why and how.
*Backend*:
https://wikitech.wikimedia.org/wiki/Performance/Guides/Backend_performance_…
* New "Getting started" section, with pointers to specific chapters for detailed
guidance.
* Rewritten "Shared resources" chapter, now with a more accessible explanation
of MySQL deadlocks and how to avoid them.
* Update "Multi-datacenter deployment" guidance. (No changes are needed to
existing code.) We first adopted Multi-DC practices in 2015. WANObjectCache and JobQueue
interfaces have gotten simpler since. Cross-DC purges and job queuing "just
work", with no awareness or responsibility on calling code. MediaWiki now
automatically pins a browser to the primary DC for a few seconds after publishing an edit.
This allowed us to remove cross-DC complexity around the ChronologyProtector
<https://doc.wikimedia.org/mediawiki-core/master/php/classWikimedia_1_1Rdbms_1_1ChronologyProtector.html#details>.
== *Measuring* ==
The new "measure" guides help assess performance of existing code, and can help
iterate development of proposed changes.
Frontend includes browser dev tools and continuous monitoring through dedicated perf
testing infrastructure:
https://wikitech.wikimedia.org/wiki/Performance/Guides/Measure_frontend_per…
Backend includes flame graphs, benchmarking, and automatic Grafana stats if you adopt
WANObjectCache:
https://wikitech.wikimedia.org/wiki/Performance/Guides/Measure_backend_perf…
== *More* ==
The above guides and an overview of datasets, tools, recommended Grafana dashboards, and
infrastructure diagrams are available at:
https://wikitech.wikimedia.org/wiki/Performance
On behalf of the Performance Team,
-- Timo Tijhof.
[1]
https://techblog.wikimedia.org/2018/12/12/why-performance-matters/
[2]
https://www.mediawiki.org/wiki/Wikimedia_Performance_Team#Mission