After the move to nginx/php-fpm, the next natural course of action is to move to HHVM and php-fpm as a fallback.
What is HHVM?
HHVM is an open-source virtual machine designed for executing programs written in Hack and PHP. HHVM uses a just-in-time (JIT) compilation approach to achieve superior performance while maintaining the development flexibility that PHP provides. HHVM is developed by Facebook.
As a result my response time drop by another 400ms to about 1,500ms from 1,900ms as shown in the screenshot below.
$ apt-get install software-properties-common
$ apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449
$ add-apt-repository 'deb http://dl.hhvm.com/ubuntu trusty main'
$ apt-get update
$ apt-get install hhvm
nginx’s HHVM config (hhvm.conf)
HHVM config (server.ini)
I am running HHVM through a file socket.
hhvm.server.type = fastcgi
Previously, I can’t install HHVM because my VM is on the 32bit version of Ubuntu 14.04.2 LTS (Trusty Tahr). HHVM only supports 64bit machines.