1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Detailed post about HHVM implementation at Wikipedia

Discussion in 'Off Topic' started by ForestForTrees, Jan 1, 2015.

  1. ForestForTrees

    ForestForTrees Well-Known Member


    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.
    RoldanLT, RobinHood, Mouth and 2 others like this.
  2. Mouth

    Mouth Well-Known Member

    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
  3. Mr. Goodie2Shoes

    Mr. Goodie2Shoes Well-Known Member

    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 ?
    Xon likes this.
  4. Mouth

    Mouth Well-Known Member

    MySQL creates the sock file, and has no problem. PHP-FPM connects to it fine.
  5. SilverCircle

    SilverCircle Well-Known Member

    Looking promising. Finally, PHP might become a viable alternative to JVM and similar solutions for projects where performance really matters.
  6. Karelke

    Karelke Active Member

    I believe PHP 7 will provide similar performance.

Share This Page