In this article I will demonstrate a comparison that I made running the largest and most globally famous CMS — WordPress. I’ll demonstrate it running on a HHVM and in a common LAMP.
Well, you should be wondering why I chose the LAMP and not the NGINX or other WebServers, I chose the LAMP to make this comparison because of the huge amounts of WordPress sites running on this platform.
So let the scenario that was used:
I used my MacBook Pro and I created two identical virtual machines via Parallels, one of them to run LAMP and another with HHVM
Take a look on my Macbook Settings:
MacBook Pro with Intel Core i5 and 4gb of DDR3 Memory
So, as you could see in the images above, the two machines are practically identical.
Both of virtual Machines have 2 CPU’S 2048MB of memory and they are running Ubuntu Linux 13.10
The version of WordPress that was installed in two virtual machines was the current, up to date, stable version 3.8, and MySQL was used as database.
Both virtual machines are using the default WordPress theme:
The test and analysis tool used was the ab — Apache HTTP server benchmarking tool
Let us first analyze the results of testing done on WordPress running on LAMP
The test was conducted by sending 5000 requisitions to Apache with a concurrency of 200 per time, where it should interpret and display a WordPress post with 23544 bytes, in the same post was image and text.
Time taken for requests: 132.623 seconds
Resquests per second: 37.70
Time Per request 26,525 ms
Transfer rate 877.80 kbytes/sec
Now let’s see how HHVM has done
The test was conducted by sending 5000 requisitions to HHVM with a concurrency of 200 per time, where it should interpret and display a WordPress post with 25068 bytes, in the same post was image and text.
Time taken for requests: 75.007 seconds
Resquests per second: 66.66
Time Per request 15.001 ms
Transfer rate 1644.57 kbytes/sec
So doing a clean and calm analysis of the data we have this:
Time Taken for Requests:
HHVM was 57,616 seconds faster then Apache, wich means 43,44% plus faster!!!!
Resquests Per Second:
HHVM made 29 requests per second more than the Apache, which means an improvement of 77%.
Time Per Request:
HHVM had superior performance of 11.524 ms, which means an improvement of 43.45% at the time of request.
HHVM had a higher transfer rate at 766.7 Kbytes / sec which means a better rate by 87% compared to LAMP
The average of those analyzed criteria is correct to say that WordPress running on HHVM has a 63% better performance than running only on LAMP.
If we use the highest score as a criterion we see that it has a 87% improvement in performance.
If you are a developer that builds solid and robust applications running on WordPress consider learning and using the HHVM.
See u soon!