Nginx: PHP alternative HHVM

Those who want to make further optimizations in the execution speed of PHP scripts will sooner or later stumble upon HHVM - a just-in-time compiler for PHP.

nginx_logoHHVM can be easily accessed via the Debian package management installed will be. Once that's done, it can, in principle. php5-fpm can be used. I left all the rest of the configuration inside Nginx - this allows for good performance comparisons:

Nginx with HHVM
Nginx with HHVM

The result: HHVM is much faster than PHP5-FPM (PHP 5.6.14) - but if you use microcaching in Nginx, both variants of processing PHP come to similar values: logical, since the final result is already in the cache. So for what purposes is HHVM on? Whenever the script itself did not change, but a lot of dynamic data is processed, the result of the script is open. HHVM needs a "warmup" just like the variant with caching, only the second execution of the scripts delivers good results.

This is particularly noticeable in the WordPress backend, for example. When creating a post, the individual actions are executed much faster than with the standard PHP variant. So if you want to get more performance out of your PHP scripts without having to change the scripts themselves, you should HHVM take a closer look.

Leave a Comment

Your email address will not be published. Required fields are marked *

en_USEnglish
Scroll to Top