Skip to content
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

Consider "wasted memory" for OPcache setup checks #49438

Open
MichaIng opened this issue Nov 21, 2024 · 0 comments
Open

Consider "wasted memory" for OPcache setup checks #49438

MichaIng opened this issue Nov 21, 2024 · 0 comments
Assignees
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: settings

Comments

@MichaIng
Copy link
Member

How to use GitHub

  • Please use the 👍 reaction to show that you are interested into the same feature.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Is your feature request related to a problem? Please describe.

We have a case there a Nextcloud AIO Docker container admin receives full OPcache warnings, despite size being raised to 256 MiB and JIT buffer reduced to 8 MiB, which was thought to be sufficient with larger margin: nextcloud/all-in-one#5559
While the intransparent increase of the overall OPcache usage, when JIT is enabled (not transparently in dedicated JIT buffer) explains this case mostly, another part is a relatively high "wasted memory":

When scripts are updated and their OPcache entry is updated via common revalidation (not active invalidation), their old entry seems to remain, occupying OPcache as wasted memory. It is however freed (via engine restart) automatically, if additional memory is needed, and wasted memory does exceed 5% (default) of the overall OPcache size. The linked report at AIO indicates that the OPcache engine did not require more memory yet, as the wasted memory did exceed 5%, but was not cleared, obviously.

The Nextcloud admin panel checks do not consider wasted memory as potential free memory yet.

Describe the solution you'd like

Read out opcache.max_wasted_percentage value, and consider all wasted cache above this percentage was free memory, as it would be freed, as fast as the engine really requires it.

Describe alternatives you've considered

Simpler, but possible false negatives: Consider all wasted memory as free memory.

Additional context
I will implement this, once I find time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of enhancement feature: settings
Projects
None yet
Development

No branches or pull requests

1 participant