Re: Practical comparisons on PHP7
| From: | Jefferson Gonzalez | Date: | Wed, 09 Dec 2015 03:48:07 +0000 |
| Subject: | Re: Practical comparisons on PHP7 | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-89769@lists.php.net to get a copy of this message | ||
On 12/08/2015 08:32 AM, Lester Caine wrote:
On 08/12/15 02:23, Rasmus Lerdorf wrote:Well I did my own benchmark with my custom made CMS on AMD bulldozer:Ah, I just checked. You have no opcache at all in your PHP 7 setup. And you have eaccelerator configured for PHP 5. So an opcode cached PHP 5 is only 10% faster than a completely unaccelerated PHP 7. That's pretty damn impressive!Gallery page with heavier loadExecute Memory Queries DatabasePHP5.4eaccelerator off ... 0.60s 10.14Mb 153 0.39s eaccelerator on ... 0.49s 3.57Mb 153 0.39sPHP5.6 TODO PHP7opcache off ... 0.50s 7.00Mb 153 0.30s opcache on ... 0.40s 2.00Mb 153 0.30sI'm still taking the 'twice as fast' claim with a pinch of salt, and I'm only seeing opcache is performing as well as eaccelorator, so the idea that PHP7 is an 'essential upgrade to improve performance' may have relevance with some applications, but for the average user simply upgrading the computer may have a better result? I'm still interested in the idea of improving async operations such as not having to wait for all database results until essential, and I'm a little curious why the database service time is so much shorter between 5 and 7 THAT is the major gain between versions. But I need to check if 'Execute' was the total or excludes the database element. I had thought it was the total as the 'Server Stats' also includes the percentage of time handing database queries. Since exactly the same database service is providing both they should be identical so something else is affecting that figure. Bottom line is that given the real world loading on my sites, the differences are probably in the noise of network transit times so not impressive at all :(
PHP 5.6 with opcache takes as a median 60ms to render a page.
PHP 7.0 without opcache takes as a median 30ms to render a page.
PHP 7.0 with opcache takes 5ms as a median to render a page.So as somebody already said, maybe your code or setup is really busted. PHP 7.0 without opcache can be as twice as fast than PHP 5.6 with opcache, while PHP 7.0 with opcache maps the floor with PHP 5.6.