Bug #70613 [Opn]: PHP7 degraded performance

From: Date: Thu, 01 Oct 2015 18:00:25 +0000
Subject: Bug #70613 [Opn]: PHP7 degraded performance
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196331@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
 Updated by:         rasmus@php.net
 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
 Block user comment: N
 Private report:     N

 New Comment:

Initial guess would be that your opcache is not working/enabled in your PHP 7 setup. Check your
phpinfo() page.


Previous Comments:
------------------------------------------------------------------------
[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


Thread (11 messages)

« previous php.bugs (#196331) next »