Bug #75488 [Com]: Under heavy load PHP misses Opcache hits with no errors

From: Date: Mon, 07 May 2018 14:12:58 +0000
Subject: Bug #75488 [Com]: Under heavy load PHP misses Opcache hits with no errors
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215146@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75488&edit=1 ID: 75488 Comment by: david at davidfavor dot com Reported by: david at davidfavor dot com Summary: Under heavy load PHP misses Opcache hits with no errors Status: Open Type: Bug Package: opcache Operating System: Ubuntu Artful PHP Version: 7.2.3 Block user comment: N Private report: N New Comment: When Opcache is working correctly CPU usage should be near 0%, as only a lookup is done + code returned. When Opcache shows 100% load, Opcache is failing. This can easily be seen on machines running massive disk I/O as the time required to load + compile PHP can be many seconds. I'd expect Opcache to return 0% all the time, it it were working correctly. Previous Comments: ------------------------------------------------------------------------ [2018-04-27 15:28:26] nikic@php.net It's not immediately obvious to me that there is any bug here. Why do you think that any log entry without 0.00% CPU usage indicates an opcache miss? Execution time and CPU load vary and your 99-percentile load is going to be significantly higher than your average load. Especially as opcache itself only reports 2 misses, I'd assume that at least this particular case is simply due to statistical variation. Now, the actual production case you describe does look like an actual problem. This kind of behavior should not occur during normal operation, but this would be fairly typical during an opcache restart. Do these occurrences coincide with anything that could trigger an opcache reset (files being deployed, fpm reloaded, etc.)? ------------------------------------------------------------------------ [2018-03-26 14:28:55] david at davidfavor dot com Bug persists. Bumping PHP level. ------------------------------------------------------------------------ [2018-03-07 13:51:23] david at davidfavor dot com Problem still exists. Bumping PHP + OS versions. ------------------------------------------------------------------------ [2018-01-15 16:06:45] david at davidfavor dot com This is a huge problem for high traffic sites using PHP for dynamic content generation. Be great if someone knowledgable about Opcache could take a look at this + determine a fix or work around. Thanks. ------------------------------------------------------------------------ [2018-01-15 16:05:12] david at davidfavor dot com Bumping version to 7.2.1 as problem still exits. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=75488 -- Edit this bug report at https://bugs.php.net/bug.php?id=75488&edit=1

« previous php.bugs (#215146) next »