HHVM Vs PHP 7 Performance Showdown (WordPress, Nginx)

IMG-LOGO Table of Contents What is HHVM? Advantages of HHVM Disadvantages of HHVM HHVM vs PHP 7 TEST 1: Loadstorm test TEST 2 : WebPageSpeed test TEST 3: WP Performance Tester Plugin The Verdict What is HHVM?

In case you have not heard about it till now, let me tell you a few things about it in brief, before we go into the HHVM vs PHP 7 tests

HHVM is an abbreviation for HipHop Virtual Machine. It was created by Facebook in 2010, with the first public version released in 2011. The main reason behind its creation was to save the server resources and to provide a faster web experience. It does so with the help of a Just in Time (JIT) compiler, which takes PHP code and complies it into Machine code on the fly.

Advantages of HHVM

  • Performance boost: one of the major advantages that HHVM brings to the table is a considerable performance boost, thanks mainly due to the JIT compiler.
  • Facebook: What makes the HHVM community and support great and dependable is the fact it is being backed by Facebook. As Facebook uses HHVM itself as well, it works hard to optimize it as much as it can.
  • Hack: The ability to statically code, using HHVM internally developer language hack further increases the speed of compilation.

Disadvantages of HHVM

  • Custom extensions: You can add out-of-the-box custom extensions. You will have to convert the extensions for HHVM first before adding them
  • Facebook: Yes this is one of the advantages of HHVM, but what if Facebook decides not to go back to it one fine day? This would mean that HHVM would lose the great Development and Support community that they have.
  • WordPress Plugins and Themes: Another big disadvantage for HHVm is that it does not support all the WordPress plugins and themes out of the box. You might have to hack some of them to work properly with HHVM.
  • Supports high-end machines: HHVM is not supported for any 32-bit machines. Along with this HHVM also takes a lot of memory as compared to PHP 7 which puts constraints on the server selection. HHVM, ideally does not work well with smaller servers (<2 GB ram).

Let’s get down to the performance test between HHVM and PHP 7

HHVM vs PHP 7

Test site details

  • The latest available WordPress version at the time when the article was written was WordPress 4.4.2
  • 1000 blog posts on the site
  • TwentySixteen default theme
  • 150 users
  • Around 500 comments

Server Details

  • Hosted on an Ubuntu 14.04 server
  • With 1GB Ram
  • 20GB SSD Disk
  • Running Nginx (No caching)
  • Dedicated VPS Hosting 
TEST 1: Loadstorm test

We tested the same WordPress site for HHVM and PHP 7 on the same server on the load Performance benchmark test at loadstorm.com. The test was conducted for upto 10 concurrent users for a duration of 10 minutes.

PHP 7

loadstorm-php7-test

HHVM

loadstorm-hhvm-test

Comparing the two tests, we can see that even though HHVM was slow to start off with and got a huge spike in the response time, after the first minute or so it caught up and even made ground to PHP 7 as it emerged the clear winner in this test.

loadstorm-compare-hhvm-php7

 We can see that the average response time for HHVM is far less than that for PHP 7, even with having such a high Peak Response Time. Its performance during the initial part of the test was slow due to the fact that it caches the pages initially which can cause a temporary performance drop, but after that the performance picks up incredibly.

loadstorm-hhvm-php7-bar

TEST 2 : WebPageSpeed test

This is a simple web page speed test loading test performed at http://www.webpagetest.org/

PHP 7

WebPagetest Test Result-php7-uizen

HHVM

WebPagetest Test Result -hhvm-uizen.com

In this test, both PHP 7 and HHVM sites fared almost equally, with the latter’s site loading slightly faster than the PHP 7 WordPress site.

hhvm-php7-php5.6-load-time-bar

TEST 3: WP Performance Tester Plugin

For the third and final test, we used the “WP Performance Tester” plugin, which is a Performance benchmark testing WordPress plugin

WP-performance-test-hhvm-v-php7

In this test we found that the PHP 7 WordPress site had the edge and performed better, as we can see from the total Execution time taken by the PHP 7 site was less than than that for the HHVM site and it also executed more queries per second.

wp-performance-hhvm-php7-bar

The Verdict

From our tests, we found that though PHP 7 has caught up a lot against HHVM, from PHP 5.6, the HHVM WordPress site still performed better for a high number of concurrent requests on the server. This is because it takes less CPU resources and thus gives a better response time than PHP 7.

That being said PHP 7’s performance was almost at the same level as HHVM for the Site load time test. PHP 7 also performed better in terms of the number of queries executed per second.

In my opinion, it comes down to what your requirements are. If you have a multi-core server that can handle HHVM without crashing or have a site that might have a large number of concurrent hits, then it would perform better for you. If you are looking for a stable WordPress platform for the future, that performs better than PHP 5, then you should go for PHP 7. I won’t be surprised if PHP 7 catches up to HHVM or even surpasses its performance in the coming days

Vikrant DattaVikrant Datta

I am a Co-Founder at WPOven INC currently living in Vancouver, Canada. My interests range from Web Development to Product development and Client projects. I am also interested in web development, WordPress, and entrepreneurship.

Related Posts:

  • New PHP 8 update
    Everything to know about the New PHP 8 update
  • WordPress PHP Version Benchmark
    WordPress PHP Version Benchmark Comparison - Performance…
  • Nginx vs. Apache, which is better for your WordPress site
    Nginx vs. Apache, which is better for your WordPress site
  • How to Rename Files in Linux
    How to Rename Files in Linux Using the mv and rename…
  • Fastest WordPress Hosting
    Top 6 Fastest WordPress Hosting (Ultimate Comparison) 2023
  • Add Facebook Like Button On Your Wordpress Site
    Make Your WordPress Website ‘Likable’ By Adding the Facebook…

16 Replies to “HHVM vs PHP 7 Performance Showdown (WordPress, Nginx)”

  1. I am also all in for PHP7, but in real test HHVM is still best option for most existing project as PHP7 compatibility is still an issue. Bunch of essential plugin did not worked out-of-the box in PHP7 for me.

    Reply
    1. Yup you’re absolutely right. All the themes and plugins are not fully compatible with PHP 7 yet, but this should change once PHP 7 installs start to increase. You can also check out our PHP 7 vs PHP 5.6 performance comparison as well https://www.wpoven.com/blog/php-5-6-vs-php-7-wordpress-sites-nginx/

      Reply
  2. Hello;

    i have used HHVM on a 2GB RAM server, my problem is that it shuts down itself sometimes

    Reply
    1. Hi Kingsley

      Even I had the same problem. HHVM takes up a lot of memory and when ever the site used to get about 5-10 concurrent users, HHVM used to crash. Tried a lot of things to solve the issue, but finally cleaned the whole server and installed everything from scratch again, which removed the issue.

      Reply
    2. If you use NGINX as your webserver you can install HHVM with a backfall on PHP7.1 You also could setup monit to monitor and start HHVM if it shuts down itself.

      Reply
  3. I’ve found that php7 is more stable than hhvm for me in my experience.

    Reply
  4. Pingback: Comparamos PHP7 vs HHVM vs PHP-FPM - Guiadev
  5. Pingback: PHP 7 vs HHVM - Which One Should You Use?
  6. Pingback: HHVM : quels sont les avantages et inconvénients par rapport à PHP7 ?
  7. Running php 7.1 and happy with the results. With no caching 7 does as well as hhvm way ahead of 5.4 performance boost worth the uprade

    Reply
  8. I found that PHP7 is more better in performance and yet stable in WordPress environment. The good thing is that PHP7 gives us almost equal performance rate like HHVM. I am in favor of PHP7 because its first response time is better than HHVM.

    Reply
  9. Pingback: Qu'est ce que HHVM? - Geek
  10. Thanks a lot

    Reply
  11. PHP7 is more better in performance and yet stable in WordPress environment.

    Reply
    1. PHP8 is will be better than 7.

      Reply
  12. Great Post Abut HHVM vs PHP 7 Performance Showdown (WordPress, Nginx

    Reply

Leave a Reply Cancel reply

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

Comment *

Name *

Email *

Website

Save my name, email, and website in this browser for the next time I comment.

Δ

Post navigation

Previous Post New File Manager to easily manage your site’s files and foldersNext Post How To Resolve WordPress Not Sending Emails Issue? [2023] Table of Contents What is HHVM? Advantages of HHVM Disadvantages of HHVM HHVM vs PHP 7 TEST 1: Loadstorm test TEST 2 : WebPageSpeed test TEST 3: WP Performance Tester Plugin The Verdict Managed WordPress Hosting

Webmaster Tools

SMTP Server For Testing Email Extractor Ping tool SSL Checker Find All Webmaster Tools

Want faster Wordpress? Try Our Dedicated Wordpress Hosting and see the difference for yourself. 14 Days Free Trial of Managed WordPress Hosting I don't want fast website

Từ khóa » Hhvm Vs Php 8