Add new comment

Benchmarking Drupal 7 on PHP 7-dev

Difficulty: 
Piece of Cake

There are big expectations surrounding PHP7.

PHP has seen the threat and needs to keep up with competitors such as HHVM or the recently open source and cross platform compatible .Net Framework. Even a while ago (2011) the .Net implementation of PHP (Phalanger) already was light years superior and much better performant than Zend Engine, and was proposed as a replacement of the Zend Engine (read the full story here).

So we decided to download the latest available dev version of PHP7 and spend 15 minutes to do a quick benchmark of a freshly installed D7 home page.

This is a 100% default D7 setup on Windows (IIS 8.5) against a local MySQL database and no modifications whatsoever with Zend Opcache turned on.

Benchmarked using Apache Bench with c=20 and n=1000

With PHP 7.0.0-dev (Build date: Mar 14 2015 22:22:57):  490 requests per second

With PHP 5.6.6: 310 requests per second.

That is nearly 58% more throughput. Quite impressive.  Of course this is a simple and superficial benchmark, but possible indicator of what is about to come.

And what if we enable page caching?

With PHP 7.0.0-dev (Build date: Mar 14 2015 22:22:57):  1800 requests per second

With PHP 5.6.61550 requests per second.

That's an extra 16%.

One first impression is that PHP7 is going to benefit more non-static (or none "presentation card") websites, AKA Web Applications.

I can't wait to see the real difference once the SQL Server PDO driver and Wincache are available for PHP7, and God willing native prefetching is finally fixed in the SQL Server PDO.