HHVM Performance Lockdown: Is HHVM Reaching Its Limit?

Want to help support this blog? Try out Oh Dear, the best all-in-one monitoring tool for your entire website, co-founded by me (the guy that wrote this blogpost). Start with a 10-day trial, no strings attached.

We offer uptime monitoring, SSL checks, broken links checking, performance & cronjob monitoring, branded status pages & so much more. Try us out today!

Profile image of Mattias Geniar

Mattias Geniar, June 14, 2015

Follow me on Twitter as @mattiasgeniar

The latest HHVM blogpost is all about getting performance gains from HHVM in real-life situations. With a noticeable increase for MediaWiki, all other frameworks are stalling.

Is HHVM reaching its performance limit?

These were the results of the week-long effort focussed on increasing the performance of HHVM, showing the throughput of Drupal, WordPress & MediaWiki after the improvements were implemented.

hhvm_lockdown_performance

MediaWiki got a nearly 20% improvement, but WordPress & Drupal remained the same.

Earlier on, the HHVM team already worked together with MediaWiki to assist in their migration from PHP to HHVM, this additional knowledge may have helped in gaining the 20% performance boost.

In the lockdown, we were able to improve MediaWiki performance by 19.4%, and WordPress by 1.8%. Unfortunately, Drupal wins were no longer measurable once the Drupal database was patched to fix the aforementioned plugin bug.

But equally as important, HHVM remains faster than PHP.

Across the board we found that HHVM performs best on applications where CPU time is maximized. In particular we’re 1.55 times faster than PHP 7 on a MediaWiki workload, 1.1 times faster on a Drupal 7 workload, and 1.19 times faster on a WordPress workload.

As none of these frameworks take advantage of the asynchronous I/O architecture available in HHVM (i.e., async), it’s not surprising that the greatest performance benefits come from the efficient execution of PHP code possible with a JIT compiler.

These are the latest benchmark figures, as ran by the HHVM team, comparing HHVM to the latest PHP builds.

hhvm_performance_comparison

I should take my time and redo my PHP vs HHVM performance benchmark from last year again, since a lot has changed to both PHP and HHVM in the meantime.

The entire performance lockdown of HHVM blogpost is worth a read and goes into great technical detail.

But with all these performance tweaks, most users will only notice a 1-5% increase in their applications. Could this mean HHVM has reached its limit when it comes to improving PHP’s raw performance?

While the benefits of async I/O are unique to HHVM and could further increase performance greatly, these kind of features aren’t yet available to us common PHP users due to lack of compatibility in the main PHP engine.



Want to subscribe to the cron.weekly newsletter?

I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.

It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.

No spam. Just some good, practical Linux & open source content.