update: now with PHP 5.7 (PHPng) comparison
Was really curious to follow up on PHP 5.6 with “real world” benchmarks so I built up a machine today for some quick’n’dirty tests. (I’ll add more tests to this at a later date as I have actual things to do this weekend and this was quite a bit of work).
Everything was allowed to pre-cache heavily, linux, mysql, php opcache, etc. this is just a raw php performance test (but no wp-cache, all dynamic pages)
Two tests: (for now)
1) directly calling the wordpress front page via php-fpm via the fcgi utility, which bypasses all of the web front end (nginx) so it is pure PHP speed
1000 passes (one pass at a time, single file asap via fcgi)
PHP 5.4 median = 28.562 seconds
PHP 5.6 median = 26.783 seconds
PHP 5.7 median = 19.405 seconds
6.22% improvement with PHP 5.6
32.06% improvement with PHP 5.7
2) full web interface benchmark with logged in admin user, going into view “all posts” in the wp-admin backend (/wp-admin/edit.php) – this makes WordPress work really hard because it is loading all of the engine, plus the wp-admin code, plus authorizing the user via the cookie
1000 passes (one pass at a time, single file asap via curl)
PHP 5.4 median = 42.523
PHP 5.6 median = 39.455
PHP 5.7 median = 29.498
7.21% improvement with PHP 5.6
30.63% improvement with PHP 5.7
environment:
Intel Quad Core i5 @ 3ghz
CentOS 6.5 64bit, MariaDB 10.0.11, Nginx 1.6.0, PHP 5.4.30/5.6.0beta4, Zend Opcache 7.0.4
WordPress 3.9.1 (stock with wp-cron disabled)
All built with GCC 4.8.2 and I made PHP 5.4 and 5.6 both use the same new Zend Opcache (because it is amazing)
I’ll do more comparisons and maybe even build PHP 5.5 at a later date.
Let me know if there are any specific requests for good things to compare.
Added PHP 5.7 (aka PHPNG) something to look foward to in 2015