Description
PHP 5.5+ version above, you can use PHP's own opcache to turn on performance acceleration (the default is off). For PHP versions below 5.5, APC acceleration is required, which does not indicate that the PHP APC acceleration method can be searched on its own internet.
PHP Open Opcache method
1. Open the php.ini file (if there is no php.ini in the/usr/local/lib directory of CentOS, then copy a past from PHP after extracting the source file, for example: php.ini-production)
2. Find: [Opcache], set to:
[Opcache]; DLL address Zend_extension=php_opcache.dll; Switch to open opcache.enable=1; Open Cliopcache.enable_cli=1; Available memory, as appropriate, in units: mbopcache.memory_consumption=528; Zend Optimizer + The total memory of the string in the staging pool. (unit: MB) opcache.interned_strings_buffer=8; For multi-cache file limit, hit less than 100%, you can try to improve the value of opcache.max_accelerated_files=10000; Opcache will be in a certain time to check the file modification time, here set check the time period, the default is 2, positioning for the second opcache.revalidate_freq=1; Turn on quick close to open this the memory recovery rate will increase when PHP Request shutdown opcache.fast_shutdown=1
Php5.6+7 Code Performance Acceleration-Turn on Zend opcache-optimize CPU