PHP-FPM vs HHVM for WordPress: which one is right for me?

Everybody loves to have a very fast website, right? And those who use a platform like WordPress have a lot of ways to make it go a lot faster. Most ways to get a faster WordPress require a little tweaking on the CMS’s dashboard, and of course a plugin or two, but there’s a lot of tweaking waiting on the server side too. The system being used to run PHP is the perfect example of this, and for a few years people have discussed which is the best tool for this task. Today we’re going to take a quick look at two of them: PHP-FPM vs HHVM

Introduction

PHP-FPM is a FastCGI alternative implementation that provides a lot of useful features and can be used by any website, even by sites with a lot of traffic. It has been officially bundled with PHP since version 5.3.3, which means that it has the support of one of the biggest dev communities out there.

HHVM is a bit newer, originally released in 2011. It’s a JIT-based process virtual machine which focuses on the execution of two programming languages: Hack and PHP, but for now we’re just interested in the last one. HHVM has been developed by Facebook and it’s available under PHP license, while the source code can be found on GitHub.

So far, a lot of people have made a lot of comparisons between PHP-FPM and HHVM, and today we’re going to tell you which one is the right for you, based on our experience of course.

PHP-FPM vs HHVM – Performance

HHVM takes the cake here. In the best scenarios, HHVM will double PHP-FPM’s performance, unless we’re running PHP 7.x, which is almost as fast as HHVM when it comes to PHP execution. HHVM still has the advantage anyway, so if you want better load times and don’t care too much about possible side effects, this is the tool you’re looking for.

 PHP-FPM vs HHVM – Compatibility

One of the big problems we’ve found when using HHVM is that a lot of popular WordPress plugins are not compatible with this system. If you need to run an important plugin and HHVM is giving you a lot of troubles then should start thinking if it’s really worth it. PHP-FPM on the other hand won’t give you a hard time with most plugins.

 PHP-FPM vs HHVM – Installation and Configuration

One major point for PHP-FPM is the easy installation and configuration process. Is possible to install the latest version quickly using tools like yum, and to configure it you just need to edit one file. HHVM on the other hand is a lot more complicated, because most easy ways to install it will get you an old version, and also a lot of files to setup. And if you install it the hard way you’ll still have a lot of files to check and configure properly.

PHP-FPM vs HHVM – Benchmarks

These are some benchmark results we have found:

WPOven.com performed a LoadStorm test and they got the following results.

As you can see in the chart below, HHVM was the winner with response times far better than PHP’s.

PHP-FPM vs HHVM
JeffGeerling.com ran some test using PHP 5.6.x, PHP 7.x and HHVM 3.11.x

HHVM completely crushed the results of PHP 5.6 (outperformed it by 150%), and it also did better than PHP 7, reaching 35 requests per second.

PHP-FPM vs HHVM
And last but not least, we have Kinsta.com‘s test, they used WordPress 4.4, HHVM 3.10.x and PHP 7.x (with Opcache and without it)

The results are pretty interesting, because PHP’s performance without Opcache was very low, less than 100 transactions per second in fact, but using Opcache it reached almost 300 transactions per second, but still wasn’t enough to beat HHVM, that made it to 350 transactions per second.
PHP-FPM vs HHVM
As we could see, HHVM is hands down the winner in these WordPress performance tests.

Conclusion

In our experience, PHP-FPM is a better overall PHP execution system. While it provides less performance than HHVM, it’s a lot easier to install and setup, and usually you won’t run into compatibility problems. HHVM is still an immature system, it needs to get a lot better in a few points before being able to completely beat PHP-FPM. Remember that the Facebook team is developing it, so maybe in a couple of years it will turn the tables.

Everybody loves to have a very fast website, right? And those who use a platform like WordPress have a lot of ways to make it go a lot faster. Most ways to get a faster WordPress require a little tweaking on the CMS’s dashboard, and of course a plugin or two, but there’s a lot of tweaking waiting on the server side too. The system being used to run PHP is the perfect example of this, and for a few years people have discussed which is the best tool for this task. Today we’re going to take a quick look at two of them: PHP-FPM vs HHVM

Introduction

PHP-FPM is a FastCGI alternative implementation that provides a lot of useful features and can be used by any website, even by sites with a lot of traffic. It has been officially bundled with PHP since version 5.3.3, which means that it has the support of one of the biggest dev communities out there.

HHVM is a bit newer, originally released in 2011. It’s a JIT-based process virtual machine which focuses on the execution of two programming languages: Hack and PHP, but for now we’re just interested in the last one. HHVM has been developed by Facebook and it’s available under PHP license, while the source code can be found on GitHub.

So far, a lot of people have made a lot of comparisons between PHP-FPM and HHVM, and today we’re going to tell you which one is the right for you, based on our experience of course.

PHP-FPM vs HHVM – Performance

HHVM takes the cake here. In the best scenarios, HHVM will double PHP-FPM’s performance, unless we’re running PHP 7.x, which is almost as fast as HHVM when it comes to PHP execution. HHVM still has the advantage anyway, so if you want better load times and don’t care too much about possible side effects, this is the tool you’re looking for.

 PHP-FPM vs HHVM – Compatibility

One of the big problems we’ve found when using HHVM is that a lot of popular WordPress plugins are not compatible with this system. If you need to run an important plugin and HHVM is giving you a lot of troubles then should start thinking if it’s really worth it. PHP-FPM on the other hand won’t give you a hard time with most plugins.

 PHP-FPM vs HHVM – Installation and Configuration

One major point for PHP-FPM is the easy installation and configuration process. Is possible to install the latest version quickly using tools like yum, and to configure it you just need to edit one file. HHVM on the other hand is a lot more complicated, because most easy ways to install it will get you an old version, and also a lot of files to setup. And if you install it the hard way you’ll still have a lot of files to check and configure properly.

PHP-FPM vs HHVM – Benchmarks

These are some benchmark results we have found:

WPOven.com performed a LoadStorm test and they got the following results.

As you can see in the chart below, HHVM was the winner with response times far better than PHP’s.

PHP-FPM vs HHVM
JeffGeerling.com ran some test using PHP 5.6.x, PHP 7.x and HHVM 3.11.x

HHVM completely crushed the results of PHP 5.6 (outperformed it by 150%), and it also did better than PHP 7, reaching 35 requests per second.

PHP-FPM vs HHVM
And last but not least, we have Kinsta.com‘s test, they used WordPress 4.4, HHVM 3.10.x and PHP 7.x (with Opcache and without it)

The results are pretty interesting, because PHP’s performance without Opcache was very low, less than 100 transactions per second in fact, but using Opcache it reached almost 300 transactions per second, but still wasn’t enough to beat HHVM, that made it to 350 transactions per second.
PHP-FPM vs HHVM
As we could see, HHVM is hands down the winner in these WordPress performance tests.

Conclusion

In our experience, PHP-FPM is a better overall PHP execution system. While it provides less performance than HHVM, it’s a lot easier to install and setup, and usually you won’t run into compatibility problems. HHVM is still an immature system, it needs to get a lot better in a few points before being able to completely beat PHP-FPM. Remember that the Facebook team is developing it, so maybe in a couple of years it will turn the tables.




Do you have any issues?
Check out our One Time Linux service
ORDER NOW



Lets keep in touch


Copyright © 2016 Glator.com