Anyone using HHVM + Wordpress on 512MB RAM Droplet? (LEMP stack)

Posted July 4, 2015 10.5k views

Hi everyone,

I recently tried to setup a droplet with a few wordpress plus HHVM instead of PHP-FPM.

The speed was good, but I eventually discovered that HHVM uses so much RAM that it got killed from time to time.
Also, restarting it periodically wouldn’t be as much of a solution because that way I wouldn’t use the JIT compiler fully (since it gets activated after a few calls).

Does any of you uses HHVM on the smallest droplet with wordpress?

  • yes, I tried this and it increased my blogs loading time from 1 sec to 3 secs - plus it doesnt work with SSL (only with an even slower workaround) and SSL is a must in 2015 (and ranking factor too). so hhvm on 512mb is a no-go. my advice, get wp-rocket (cache plugin) which works wonders on small sites

  • Thanks for the reply :)

    Regarding caching I’m already at a good speed, because I use the nginx memcached pass together with the wp ffpc plugin, but I wanted to see if there was a way to go beyond that.

    Did you have any chance to get in touch with the team at HHVM? I’d love to see if they can help too

  • Hi @sugarhill, when you say “ it doesnt work with SSL”, nor does PHP. It’s the web server that actually deals with SSL. It’s more likely to be an error in your nginx config. Can you post it here?

    Try this tutorial:

    As far as speed, again, I can’t figure why that would be - HHVM itself runs more than twice as fast as php5.6.

  • @jonathan
    thanks for the codeable link - very detailed tutorial on hhvm and regis

    regarding the kinsta link I quote your linked article:
    HHVM performs the test twice as fast (84.759 seconds) but consumes 4.5 times more system memory (134.844 MB).

    I guess this is why a small 512mb droplet might be slower using HHVM

  • Ok, after some testing and some chat on twitter with the incredible guys&girls over at HHVM it seems that with some tweaking I actually found a functional config for the 512mb droplet.

    I will write a more detailed blog post about this, but for those wondering the changes here the are

    1. Cut the HHVM JIT size in a half (add these lines to the server.ini) ;low-mem hhvm.jit_a_size=31457280 hhvm.jit_a_cold_size=12582912 hhvm.jit_a_frozen_size=20971520 hhvm.jit_a_prof_size=33554432 hhvm.jit_a_max_usage=31457280
    2. Change monitis to restart hhvm on lower me limit (300MB, you can even put a lower data, but you’ll risk of not being efficient). check process hhvm with pidfile /var/run/hhvm/pid group hhvm start program = "/usr/sbin/service hhvm start" with timeout 60 seconds stop program = "/usr/sbin/service hhvm stop" if failed unixsocket /var/run/hhvm/hhvm.sock then restart if mem > 300.0 MB for 1 cycles then restart if 5 restarts with 5 cycles then timeout
  • Show 1 more comments

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers


Are you still using it? So far my memory usage is below 40% except during backup when things get high.

My issues it’s the load time, without wprocket i get 3sec loads (not impressed) with the cache plugin it gets really high.

Any idea how to install the memcache?