Following the strategy announcement by the HHVM team and subsequent discussion on pikitech-l, including benchmarks indicating HHVM no longer has a performance advantage, it is proposed that we migrate the WMF MediaWiki appservers from HHVM to PHP 7.
The current plan involves first migrating the appservers from jessie to stretch (T174431).
High-level checklist
Phase 1: PHP 7 and extensions/integrations installed:
- Plain PHP 7.0 available on the command-line on all mw servers (e.g. for manual use via mwscript).
- Deciding how to install PHP 7 and how to do CGI from Apache.
- Plain PHP 7.0 available on mwdebug servers via php-fpm.
Phase 2: Verification of PHP 7 interaction with MediaWiki.
Features to be installed, tested, and known to work correctly; any behaviour/config differences between PHP7 and HHVM to be equalised or justified and documented.
- Memcached client works fine with MW.
- mysqli driver works fine with MW.
- APCu works fine with MW.
- Session handler work fine with MW.
- Post-send functions works fine with MW. - T209981
- Error and fatal error reporting works fine with MW. – T187147
- Audit and fix as needed differences in INI settings. – T211488
Phase 3: Public opt-in via WikimediaDebug.
- Add nginx handling to expose PHP7 for opted-in requests.
- Provide opt-in via X-Wikimedia-Debug for mwdebug servers.
- Debug profiling works fine with MW (e.g. xhprof, or tideways) – T206152
- Sampling profiling works fine with MW. – T176916
- Any misc issues we find from opt-in tests and anything blocking from PHP 7.2 support.
Phase 4: Public opt-in via beta feature.
- Expose PHP7 vs. HHVM generation to JS in a
headermw.config key. Look at whether we should distinguish NavTiming metrics based on whether they're served by php7 or HHVM. (Not sure whether this is valuable.)- PHP 7.2 available on all mw servers via php-fpm (web, api, jobrunners, videoscalers)
- Provide opt-in via MediaWiki Beta Feature for any web/api appserver.
- Upgrade from PHP 7.0 to PHP 7.2.
Phase 5: PHP 7.2 on by default:
- Ramp up A/B test of the beta feature for web/api app servers.
- Switch default for all users on web appservers and api appservers.
- Switch mwscript CLI on maintenance hosts and deployment hosts. – T195392
- Switch job runners and video scalers.