Re: Practical comparisons on PHP7
| From: | Rasmus Lerdorf | Date: | Tue, 08 Dec 2015 02:17:25 +0000 |
| Subject: | Re: Practical comparisons on PHP7 | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-89730@lists.php.net to get a copy of this message | ||
On Dec 7, 2015, at 16:28, Lester Caine <lester@lsces.co.uk> wrote:
>
> PHP7 is around 10% slower ... and given that half the time is taken
> in database lookup, the code performance is potentially worse. So what
> am I missing?
Then you have a config problem. The first and obvious thing to check is your opcache setup. Is it
working? phpinfo() will show you some cache stats. If opcache is working, what does your opcache
config look like? Did you compile with huge page support? If so, did you actually allocate some huge
pages for it?
If those things look ok, an strace of a request might show something. Another really handy tool is
perf. You can attach php-cgi to the socket nginx is sending requests to and perf record/perf report
it. That will give you a nice report showing where it is spending it's time.
With a properly configured setup there is absolutely no way for PHP 7 to be slower than PHP 5.
-Rasmus
Attachment: [application/pkcs7-signature] smime.p7s
Attachment: [application/pkcs7-signature] smime.p7s