Closed nathanhruby closed 9 years ago
This is similar to https://bugs.php.net/bug.php?id=68565 which seems to be merged in php-src, but not reflected in this repo.
Also, the CI build failed for 5.2 and was failing before this PR on:
FAIL ISSUE #183 (TMP_VAR is not only used once) [tests/issue0183.phpt]
Hi,
So to be specific, like the 68565 bug, when memory_consumption is set to a large value (in my case 5GB using opcache 7.0.4 with php 5.3) a cache restart will cause wasted memory to be 0 after the restart and never change, the used memory number will increase and not decrease, and keys/scripts will remain fairly steady (not drop to 0 or increase). Continued clears with opcache_clear() do nothing to resolve this. During this time hits/misses and hitrate are all adversely affected (eg, hitrate drops, misses increase).
After this applying this patch and the one from 68565 a opcache restart correctly clears all memory and keys/scripts increase with memory consumption until another restart clears all data.
This would most affect a large machine with a working set much larger than the opcache size, where frequent cycling of the cache is a requirement. Here's a graph from one of our production machines that fits this traffic patterns after our apc to opcache switch illustrating the problem:
Thanks. Committed.
...hared_globals