Illumio Blog
May 11, 2015

Taking HHVM for a Test Lap

Jimmy Ray Purser,

Find me on:

 

I was introduced to the React.js framework by one of the code jockeys at Illumio. I was very impressed with the speed of it, so in passing he said, “You should see HipHop.” Whatever… I blew it off because your old uncle Jimmy Ray listens to old school rock, baby!

Jimmy Ray's Tech Log

But I dug around anyway, and found what he was talking about: HipHop Virtual Machine (HHVM). It’s designed to optimize PHP or Hack, Facebook’s language. HHVM is basically a Linux-only VM. They say you can run it on Mac as well, if you build it, but truth is, I use mainly Linux in my DC, so I don’t need to mess around with that, man.

I’m installing this on an Ubuntu 12.04. I know, I know, I should upgrade, I just don’t have a solid reason to! I went to GitHub for the package and was surprised at the excellent instruction set there.

It installed with no probs at all. I fired up the system the hhvm–m server and started typing my PHP commands to test it out. Of course to be fair, running

cat > hello.php
<?php
echo ‘<h1>Hello World</h1>’;

over and over is really not a good speed test. Good thing the folks over at Facebook also wrote a testing script to check speed

I ran it, and it seemed fast, but I needed something to compare it to, so  I used Nginx to benchmark it. Understand that benchmarks are NOT grounded in reality. You really have to test in your DC to make sure. My testing showed that HHVM was approx. 62% faster! Yowza! 

I noticed that HHVM was slower at start up, but once it got warmed up, she was like a Penske PC23. Those results match the stuff I saw reported from the Wikipedia folks. They report that page saving dropped from 7.5 seconds to 2.5 seconds!

—Jimmy Ray

Like Jimmy Ray's tech tips? Read more. >>  

Topics: Data Center Operations

Share this post: