PHP 7.1 vs. 7.0 performance benchmarks with Symfony
In this case I followed the same procedures some earlier benchmarks, using the eZ Platform demo distribution (version 1.7.0 RC1). It is a fully fledged CMS running on the Symfony 2.8 Standard Edition.
As an application built on the Symfony Full Stack Framework, eZ Platform demo distribution represents a rather complex Symfony / PHP OOP application out of the box. The exact PHP versions used for here were 7.0.13 and 7.0.0. PHP settings were the defaults for both distributions.
The benchmarks follow the December 2015 benchmark methods so that runs are repeated three times and the average value. Notice that if you should not compare results directly to the ones from last year because both the hosting environment and the demo installation of eZ Platform has changed significantly. Also you can try free trial for high performance VPS on UpCloud.
Benchmark results and conclusions
In the first round we observe how Symfony and PHP boot up from completely uncached situation. PHP-FPM is restarted, meaning the APC opcache is completely void as is the Symfony cache directory. This means that the initial overhead is significant.
For the cold boot there is no difference in memory use, but PHP 7.1 does have an advantage of 6% or so in. On the second round both PHP's APC cache is full as is the Symfony container. This results in significantly faster request time, but again resulting in some 7% gain in performance.
Note that in these results the Symfony application is still running in development mode, thus resulting in a significant overhead for logging and limited internal caching.
In the third set of benchmarks Symfony is ran in production mode and the frontpage is hit with requests consequently with concurrencies of 1, 10 and 50:
In these results PHP 7.1 has an advantage of some 7% in the runs on low currency, but the lead closes to some 4% at higher concurrencies.
All in all there are definite improvements in PHP 7.1 over 7.0, but the changes are not as drastic as they were with the jump from 5.6 to 7.0. But there is clear improvement across the board, which is a positive sign and can yield savings when operating sites with high volume.
Best of all PHP 7.1 is pretty much a drop-in upgrade so accessing the improvements and new features is a no brainer. For more drastic changes you will need to look into future versions, such as PHP 8.0 with JIT and other improvements.
Related reading:
- Symfony Benchmarks: Introduction
- Symfony Benchmarks: PHP 5.6, HHVM 3.11 and PHP 7.0.1
- Symfony Benchmarks: Scaling PHP by adding CPU & RAM
- Symfony Benchmarks: Symfony Proxy vs. Varnish
- Symfony Benchmarks: PHP-FPM vs. PHP-PM (on PHP 7 and HHVM)
- Symfony Benchmarks: Symfony Microkernel, Lumen, Silex, Slim...