Detailed post about HHVM implementation at Wikipedia

ForestForTrees

Well-known member
http://blog.wikimedia.org/2014/12/29/how-we-made-editing-wikipedia-twice-as-fast/

An excerpt:
What we have already gained by switching to HHVM
Following extensive preparations, all our app servers are now running MediaWiki on HHVM instead of Zend. The performance gains we have observed during this gradual conversion in November and December 2014 include the following:


  • The CPU load on our app servers has dropped drastically, from about 50% to 10%. Our TechOps team member Giuseppe Lavagetto reports that we have already been able to slash our planned purchases for new MediaWiki application servers substantially, compared to what would have been necessary without HHVM.
  • The mean page save time has been reduced from ~6s to ~3s (this is the time from the user hitting ‘submit’ or ‘preview’ until the server has completed processing the edit and begins to send the updated page contents to the user). Given that Wikimedia projects saw more than 100 million edits in 2014, this means saving a decade’s worth of latency every year from now on.
  • The median page save time fell from ~7.5s to ~2.5s.
  • The average page load time for logged-in users (i.e. the time it takes to generate a Wikipedia article for viewing) dropped from about 1.3s to 0.9s.

Plus, while I'm personally not a huge fan of Facebook as a company or product, from the article it sounds like they were helpful to the WMF, which I give them kudos for.
 
I cannot get HHVM to play nicely with MySQL. Every PHP interaction with MySQL gives "An exception occurred: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'" despite me having set "mysqli.default_socket = /run/mysql/mysql.sock" in /etc/hhvm/php.ini
 
I cannot get HHVM to play nicely with MySQL. Every PHP interaction with MySQL gives "An exception occurred: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'" despite me having set "mysqli.default_socket = /run/mysql/mysql.sock" in /etc/hhvm/php.ini
I once ran into that problem (with php-fpm) and found out fpm wasn't able to create a folder in /run maybe you change it to /run/mysql.sock ?
 
Looking promising. Finally, PHP might become a viable alternative to JVM and similar solutions for projects where performance really matters.
 
Top Bottom