Bug #70613 [NEW]: PHP7 degraded performance
From: daniel at theenginuity dot com
Operating system: Ubuntu 14.04 x86_64
PHP version: 7.0.0RC4
Package: Performance problem
Bug Type: Bug
Bug description:PHP7 degraded performance
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 bug report at https://bugs.php.net/bug.php?id=70613&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70613&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70613&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70613&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70613&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70613&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70613&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70613&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70613&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70613&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70613&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70613&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70613&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70613&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70613&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70613&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70613&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70613&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70613&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70613&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70613&r=mysqlcfg
Thread (11 messages)
- daniel at theenginuity dot com
- rasmus@php.netBug #70613 [Opn]: PHP7 degraded performance
- daniel at theenginuity dot comBug #70613 [Opn]: PHP7 degraded performance
- kalle@php.netBug #70613 [Opn]: PHP7 degraded performance
- daniel at theenginuity dot comBug #70613 [Opn]: PHP7 degraded performance
- daniel at theenginuity dot comBug #70613 [Opn]: PHP7 degraded performance
- rasmus@php.netBug #70613 [Opn]: PHP7 degraded performance
- daniel at theenginuity dot comBug #70613 [Opn]: PHP7 degraded performance
- rasmus@php.netBug #70613 [Opn]: PHP7 degraded performance
- daniel at theenginuity dot comBug #70613 [Opn->Csd]: PHP7 degraded performance
- rasmus@php.netBug #70613 [Csd->Nab]: PHP7 degraded performance