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

Do OPcache recommendations based on actual cache usage #15522

Closed
MichaIng opened this issue May 13, 2019 · 3 comments · Fixed by #27403
Closed

Do OPcache recommendations based on actual cache usage #15522

MichaIng opened this issue May 13, 2019 · 3 comments · Fixed by #27403
Assignees
Labels
3. to review Waiting for reviews enhancement

Comments

@MichaIng
Copy link
Member

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

  • Currently OPcache settings (opcache.memory_consumption, opcache.interned_strings_buffer, opcache.max_accelerated_files) recommendations on Nextcloud admin panel are fixed values that match the current PHP defaults: https://php.net/manual/en/opcache.configuration.php
  • For Nextcloud-only servers, based on tests with all available apps installed, those are never reached and could be halved.
  • If other large PHP sites are present, those could be too low.

Describe the solution you'd like

  • It makes sense to prompt recommendations for each setting separately, based on the actual OPcache usage.
  • The opcache_get_status() function could be used for this. It could then be recommended to raise a value if e.g. more than 80% of the limit is reached.

Describe alternatives you've considered

  • Having failsafe high recommendations (current implementation) does not hurt much either, especially since there seems to be no negative performance impact when having "too" high values.
  • The main benefit of the requested change is then that most users (with default OPcache values active) will not face any warning while in rare cases, where higher values are required, those are covered by the warning(s) as well. Also shared hosting users, that have no access to the PHP settings, will not be bothered by the warnings, or, can do requests to their hosting provider based on a real measure.

Additional context
Related discussion has been done here: nextcloud/documentation#1439

@szaimen
Copy link
Contributor

szaimen commented May 20, 2021

As this sounds like a nice feature, the requests for this are quite low. Currently there are no plans to implement such a feature. Thus I will close this ticket for now. This does not mean we don't want this feature, but it is simply not on our roadmap for the near future. If somebody wants to implement this feature nevertheless we are happy to assist and help out.

If you wish to have this feature implemented by the Nextcloud GmbH there is the option for consulting work on top of your Nextcloud Enterprise subscription to get your features implemented.

@szaimen szaimen closed this as completed May 20, 2021
@MichaIng
Copy link
Member Author

Fair enough. I always planned to open a PR by times for this implementation, but didn't find the time so far. On my list 🙂.

@MichaIng MichaIng self-assigned this Jun 5, 2021
@MichaIng MichaIng linked a pull request Jun 5, 2021 that will close this issue
@MichaIng MichaIng added 2. developing Work in progress and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Jun 5, 2021
@MichaIng
Copy link
Member Author

MichaIng commented Jun 5, 2021

I opened a PR to address this: #27403
Own tests and polishing will be done tomorrow. I leave this issue as closed regardless, discussions can be done in the PR.

@MichaIng MichaIng added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jun 6, 2021
@MichaIng MichaIng reopened this Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants