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

Increased performance by 10% with enabling opcache file caching #351

Open
choward420 opened this issue Apr 21, 2023 · 4 comments
Open

Increased performance by 10% with enabling opcache file caching #351

choward420 opened this issue Apr 21, 2023 · 4 comments

Comments

@choward420
Copy link

choward420 commented Apr 21, 2023

Not sure how to approach this but was hoping you could include in the build.

Changed /etc/php81/conf.d/opcache.ini

FROM:
opcache.enable=1
opcache.enable_cli=1
opcache.fast_shutdown=1
opcache.memory_consumption=256
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=10000
opcache.revalidate_freq=60

TO:
opcache.enable=1
opcache.enable_cli=1
opcache.fast_shutdown=1
opcache.file_cache="/tmp/cache/"
opcache.file_cache_only=0
opcache.file_cache_consistency_checks=1
opcache.memory_consumption=256
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=10000
opcache.revalidate_freq=60

Ran the following based off of librenms performance recommendations:
mkdir -p /tmp/cache && chmod 775 /tmp/cache && chown -R librenms /tmp/cache

@Jellyfrog
Copy link
Member

opcache.revalidate_freq=60 should be removed and opcache.validate_timestamps=false should be added.

@choward420
Copy link
Author

Correction to my statement above, sudo is not installed in the docker so I ran the following:
mkdir -p /tmp/cache && chmod 775 /tmp/cache && chown -R librenms /tmp/cache

@crazy-max
Copy link
Member

10%

Can you post your benchmarks affirming this supposed percentage?

@choward420
Copy link
Author

80+ pollers running on different platforms, some virtualized, some containers, some virtualized running containers, etc. all experienced a ~10% decrease in devices polled when I upgraded to PHP8. After making the above changes, everything went back to the way it was. This wasn't an enhancement from the way it was, it just got me back to ground zero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants