-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix interned strings buffer check if 0 free bytes #36278
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but didnt test
/backport to stable25 |
/backport to stable24 |
Tested up and down with a bunch of combinations of OPcache size and interned strings buffer size and it works all as expected. And indeed, sometimes the interned strings buffer free memory was exactly 0 bytes, in which case the recommendation previously was still shown, even if interned strings buffer was already a quarter of overall OPcache size or larger. This in theory could have lead to a vicious cycle, at least if the interned strings buffer keeps being exhausted until last byte (which was not always the case in my tests, sometimes some bytes stayed free, which makes sense if there is no small fitting string to buffer):
So to finally silence all noise on that topic, this should be merged 😄. |
/rebase |
With #32902 it was meant to be avoided to recommend raising the interned strings buffer size above a quarter of the total OPcache size. This works as long as there is at least 1 byte free, but does not apply if the buffer is filled completely. This commit switches the conditions so that the interned strings buffer size must be smaller than a quarter of the total OPcache size for the warning to be shown. That the buffer must be either filled completely or by more than 90% remains untouched. Signed-off-by: MichaIng <micha@dietpi.com>
01a7641
to
03390ee
Compare
Seems like it is not available in 27. I have the warning here too:
|
That this warning is shown in your case does not mean that you are effected by the bug fixed with this PR. Double check your OPcache settings, that |
At least this case made me review the code and see the loophole.
Summary
With #32902 it was meant to be avoided to recommend raising the interned strings buffer size above a quarter of the total OPcache size. This works as long as there is at least 1 byte free, but does not apply if the buffer is filled completely.
This commit switches the conditions so that the interned strings buffer size must be smaller than a quarter of the total OPcache size for the warning to be shown. That the buffer must be either filled completely or by more than 90% remains untouched.
TODO
Checklist