Last active
November 6, 2016 14:06
-
-
Save janus57/e5467ddcd947b429faaf to your computer and use it in GitHub Desktop.
notes/memos about usefull commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enable OPcache | |
opcache.enable=1 | |
# The Memoru used by OPcache, default 64MB | |
# 128MB can ba good for 5 to 10 websites | |
opcache.memory_consumption=64 | |
# 4MB seem to be prety "low", 8MB or 16MB seem better for website with lot of same class/variables | |
# Quick "explanation" : if you have the string "foobar" 1000 times in your code, | |
# internally OPcache will store 1 immutable variable for this string and just use a pointer | |
# to it for the other 999 times you use it. | |
# So 8MB or 16MB seem to be better | |
opcache.interned_strings_buffer=8 | |
# For opcache.max_accelerated_files use : find . -type f -print | grep php | wc -l | |
# then use the number upper. | |
# example the command return 6000 then i use 7963 according to PHP doc | |
# (Cf : http://php.net/manual/fr/opcache.configuration.php#ini.opcache.max-accelerated-files) | |
opcache.max_accelerated_files=7963 | |
# Seem to be better for the performances | |
# nope : https://tideways.io/profiler/blog/fine-tune-your-opcache-configuration-to-avoid-caching-suprises + https://github.com/zendtech/ZendOptimizerPlus/issues/146 | |
# opcache.fast_shutdown=1 | |
## Performances time ! ## | |
# for 100% performances | |
# but can be (and need in case of change in php files) reset by opcache_reset() | |
opcache.validate_timestamps=0 | |
opcache.revalidate_freq=0 | |
# for better performances than default (or if opcache_reset() are disabled) | |
# PHP will check for changes… | |
opcache.validate_timestamps=1 | |
# but only every 10 minutes, so restart PHP or use opcache_reset() to "clean" OPcache before 10 minutes | |
opcache.revalidate_freq=600 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment