[1] Secrets of PHP+MySQL Tuning With Ultrafast WordPress Virtual Machine KUSANAGI

Benchmark Conclusion

Here are the total WordPress benchmark results comparing the KUSANAGI environment to a default LAMP environment.

LAMP environment
Requests per second Page load time
Apache 2.4+PHP 5.4 6.17 168ms
KUSANAGI environment
Requests per second Page load time
Apache 2.4+PHP 5.6 30.94 38ms
Nginx 1.9+PHP 5.6 31.24 38ms
Apache 2.4+PHP 7 76.76 20ms
Nginx 1.9+PHP 7 80.05 17ms
Apache 2.4+HHVM 3.12 92.42 16ms
Nginx 1.9+HHVM 3.12 97.74 15ms
Page cache (nginx 1.9+PHP 7+WordPress plugin) 1530.14 7ms
FastCGI cache (nginx 1.9) 14942.95 N/A

KUSANAGI's Middleware and Acceleration Techniques

The middleware and acceleration techniques that support KUSANAGI to produce the results seen above are as follows:

Operating system
  • CentOS 7.2
Middleware
Name Summary
PHP 5.6 The most common PHP processor. KUSANAGI can utilize OPcache for user caching or APCu as a PHP accelerator.
PHP 7.0 The latest PHP processor. KUSANAGI can utilize OPcache for user caching or APCu as a PHP accelerator.
HHVM 3.12 Facebook's PHP processor. Uses byte-code and JIT compiling for speed.
Apache 2.4 The most common web server. KUSANAGI can utilize event MPM as an event processing module, FastCGI for a PHP interface, and substitute HTTP/2 for a protocol.
Nginx 1.9 A popular high-speed lightweight web server. KUSANAGI can utilize FastCGI cache for page caching and substitute HTTP/2 for a protocol.
MariaDB Galera server 10.0 MySQL-compatible high-speed database system that allows multi-master cluster creation.
tuned Daemon that allows you to apply useful kernel parameters as a profile.
lsyncd / rsync File mirroring for use with CDNs or multiple server creation.
vsftpd FTP server. In order to update WordPress, themes, or plugins, KUSANAGI requires secure login to FTP.
Specialized WordPress plugins
Name Summary
Page caching Have flexible control over page caching for multiple devices.
Performance display Shows the actual WordPress load time and number of SQL queries in the top bar
Device switching Allows changing of theme based on device. Requires the page caching plugin to be active.
Translation accelerator Speeds up the translation of WordPress in versions other than the default.
Tools
Name Summary
WP-CLI Operates the WordPress command line.
Let's Encrypt Obtain and install a free SSL certificate.

In the upcoming articles, we will explain each of the main techniques in full, so stay tuned.

Prime Strategy is currently hiring. Please apply if you have an interest in KUSANAGI or systems development using PHP for enterprises and international cloud platforms.