Bug #70613 [Opn]: PHP7 degraded performance

From: Date: Fri, 02 Oct 2015 13:51:02 +0000
Subject: Bug #70613 [Opn]: PHP7 degraded performance
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196350@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70613&edit=1 ID: 70613 User updated by: daniel at theenginuity dot com Reported by: daniel at theenginuity dot com Summary: PHP7 degraded performance Status: Open Type: Bug Package: Performance problem Operating System: Ubuntu 14.04 x86_64 -PHP Version: 7.0.0RC4 +PHP Version: 7.0.0RC3 Block user comment: N Private report: N New Comment: Updated bug to RC3, will compile RC4 and will verify if any changes are observed in performance. I can help debug this further if anyone would like more detailed information? Previous Comments: ------------------------------------------------------------------------ [2015-10-02 11:37:59] kalle@php.net Have you tried out RC4? (PHP version says RC4 in the bug report, but comments state RC3, so just wondering) ------------------------------------------------------------------------ [2015-10-02 04:49:32] daniel at theenginuity dot com Re-verified Opcache settings in PHP 7.0 RC3, fixed missing opcache.revalidate_freq, all other settings set to same values as posted. Request per second for PHP 7.0 = 1245, 1204, 1211 ------------------------------------------------------------------------ [2015-10-01 18:00:23] rasmus@php.net Initial guess would be that your opcache is not working/enabled in your PHP 7 setup. Check your phpinfo() page. ------------------------------------------------------------------------ [2015-10-01 14:53:50] daniel at theenginuity dot com Description: ------------ I am observing degraded performance when comparing, PHP 5.6.13 vs 7.0 RC3 in a test environment. The only variable changed between tests was the version of PHP, all other OS and server configs kept constant including FPM pool. Both KVMs on the same private subnet running on an idle dedicated hardware host. Test Server: KVM 1vCPU 1GB RAM 10GB SSD Ubuntu 14.04 x64 Apache 2.4 + PHP-FPM Test Client: KVM 1vCPU 1GB RAM 10GB SSD Ubuntu 14.04 x64 Test: ab -n 20000 -c 20 http://example.com (executed test 3 times) ** Notes ** PHP 5.6.13 OPCACHE Settings opcache.revalidate_freq=60 opcache.validate_timestamps=0 opcache.max_accelerated_files=500 opcache.memory_consumption=64 opcache.interned_strings_buffer=16 opcache.fast_shutdown=1 PHP-FPM Settings listen = 127.0.0.1:9000 pm = static pm.max_children = 20 Apache 2.4 MPM Prefork Settings KeepAlive Off StartServers 20 MinSpareServers 20 MaxSpareServers 20 MaxRequestWorkers 20 MaxConnectionsPerChild 1000 Test script: --------------- <?php function HelloWorld() { return 'Hello World!'; } ?> <html> <head> <title>PHP Test</title> </head> <body> <?php echo HelloWorld(); ?> </body> </html> Expected result: ---------------- PHP 7.0 RC3 Requests per second >= PHP 5.6.13 PHP 7.0 RC3 Memory Usage <= PHP 5.6.13 Actual result: -------------- PHP 5.6.13 Average Memory Usage (Start of Test) = 35.3 MB PHP 5.6.13 Average Memory Usage (End of Test) = 38 MB PHP 5.6.13 Request Per Second (3 Test Runs) = 1314, 1316, 1315 PHP 7.0 RC3 Average Memory Usage (Start of Test) = 9.6 MB PHP 7.0 RC3 Average Memory Usage (End of Test) = 17.4 MB PHP 7.0 RC3 Request Per Second (3 Test Runs) = 1065, 1151, 1102 -------------------------------------------------------------------------- PHP 7.0 RC3 appears to use significantly less memory usage but is slower at requests per seconds compared to PHP 5.6.13 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=70613&edit=1

« previous php.bugs (#196350) next »