[opcache] zend_extension=/usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/opcache.so ; Determines if Zend OPCache is enabled 启用opcache opcache.enable=1 ; Determines if Zend OPCache is enabled for the CLI version of PHP 在cli下启用opcache opcache.enable_cli=1 ; The OPcache shared memory storage size. opcache使用的内存,单位MB opcache.memory_consumption=256 ; The amount of memory for interned strings in Mbytes. opcache.interned_strings_buffer=8 ; The maximum number of keys (scripts) in the OPcache hash table. ; Only numbers between 200 and 100000 are allowed. 存储最大的对象数目 opcache.max_accelerated_files=100000 ; The maximum percentage of "wasted" memory until a restart is scheduled. 最大浪费内存百分比,超出将会GC opcache.max_wasted_percentage=5 ; When this directive is enabled, the OPcache appends the current working ; directory to the script key, thus eliminating possible collisions between ; files with the same name (basename). Disabling the directive improves ; performance, but may break existing applications. opcache.use_cwd=1 ; When disabled, you must reset the OPcache manually or restart the ; webserver for changes to the filesystem to take effect. 验证文件改动时间错,开启之后将由validate_timestamps来提供刷新频率,对于加载文件很多的程序性能有极大影响,关闭之后将会杜绝验证文件的时候造成的抖动,但是更新文件之后需要手动重启服务或者刷新全部内容 opcache.validate_timestamps=0 ; How often (in seconds) to check file timestamps for changes to the shared ; memory storage allocation. ("1" means validate once per second, but only ; once per request. "0" means always validate) 验证时间间隔,1表示1秒,0表示总是验证 opcache.revalidate_freq=5 ; Enables or disables file search in include_path optimization opcache.revalidate_path=1 ; If disabled, all PHPDoc comments are dropped from the code to reduce the ; size of the optimized code. 缓存中保存文档信息 opcache.save_comments=1 ; If disabled, PHPDoc comments are not loaded from SHM, so "Doc Comments" ; may be always stored (save_comments=1), but not loaded by applications ; that don't need them anyway. 加载文档信息 opcache.load_comments=1