PHP Accelerator Plugin-opcache Parameters
zend_extension=opcache.so #这样去加扩展
opcache.memory_consumption=128 #为opcache分配多少共享内存128M
Opcache.interned_strings_buffer=8 the memory size of the #interned string
opcache.max_accelerated_files=4000 #最大缓存的文件数目
opcache.revalidate_freq=300 #opcache自动检测文件是否更新的周期, units per second
Opcache.fast_shutdown=1 # #如果启用, quick close sequence for accelerating code
Opcache.enable_cli=1 #是否在CLI (that is, command line) enable Opcache 1 enabled
; Determines if Zend Opcache is enabled
; opcache.enable=0 #是否启用opcache 1 enabled
; Determines if Zend Opcache is enabled for the CLI version of PHP
; opcache.enable_cli=0 #是否在CLI (that is, command line) enable Opcache 1 enabled
; The Opcache shared memory storage size.
; opcache.memory_consumption=64 #为opcache分配多少共享内存, Unit m
; The amount of memory for interned strings in Mbytes.
; opcache.interned_strings_buffer=4 #interned the memory size of the string
; The maximum number of keys (scripts) in the Opcache hash table.
; Only numbers between and 100000 is allowed.
; opcache.max_accelerated_files=2000 #最大缓存的文件数目. In fact, this value will use the first number that is greater than you configured for the following primes {223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987}, if you specify this value as 400, the value is actually 463.
; The maximum percentage of "wasted" memory until a restart is scheduled.
; Opcache.max_wasted_percentage=5 #
; When this directive was 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 could break existing applications.
Opcache.use_cwd=1 #如果置为1, the current path is added to the file key to avoid possible file key conflicts with the same file name
; When disabled, you must reset the Opcache manually or restart the
; Webserver for changes to the filesystem to take effect.
; Opcache.validate_timestamps=1 #如果置为1, Opcache automatically detects the timestamp of the file (the detection period is revalidate_freq) and updates the opcode based on the timestamp of the file, if it is set to 0, You can only manually restart Opcache or restart webserver for the updated PHP file to take effect
; 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)
; opcache.revalidate_freq=2 #opcache自动检测文件是否更新的周期, per second. If it is 0, Opcache will be detected each time the request is made. This directive is invalid when Validate_timestamps is 0 o'clock.
; Enables or disables file search in Include_path optimization
; Opcache.revalidate_path=0 #
; If disabled, all PHPDOC comments is dropped from the code to reduce the
; Size of the optimized code.
; Opcache.save_comments=1 #是否禁用文件中的注释
; If Disabled, PHPDoc comments is not loaded from SHM, so "Doc comments"
; May is always stored (Save_comments=1) and not loaded by applications
; That's don ' t need them anyway.
; Opcache.load_comments=1 #如果禁用, comments are not loaded, they are not disabled, comments are not loaded by the application
; If enabled, a fast shutdown sequence is used for the accelerated code
; opcache.fast_shutdown=0 #如果启用, quick close sequence for accelerating code
; Allow file existence override (File_exists, etc) performance feature.
; opcache.enable_file_override=0 #允许文件存在覆盖 (file_exists, etc.) performance characteristics.
; A bitmask, where each bit enables or disables the appropriate Opcache
; Passes
; Opcache.optimization_level=0xffffffff #位掩码, each one enables or disables the corresponding Opcache
; opcache.inherited_hack=1
Opcache.dups_fix=0 #为解决 "Cannot redecllare class", you can set it to 1
; The location of the Opcache blacklist file (wildcards allowed).
; Each Opcache blacklist file was a text file that holds the names of files
; That's should not being accelerated. The file format is to add each filename
; to a new line. The filename is a full path or just a file prefix
; (i.e.,/var/www/x blacklists all the files and directories in/var/www
; That's start with ' X '). Line starting with A; is ignored (comments).
; Opcache.blacklist_filename= #黑名单文件设置
; Allows exclusion of large files from being cached. By default All Files
; is cached.
; Opcache.max_file_size=0 #允许排除大文件缓存. By default, all files are cached.
; Check the cache checksum each N requests.
; The default value of "0" means that the checks is disabled.
; opcache.consistency_checks=0 #每N个请求检查缓存校验, the default value of "0" means check disabled. Turn on check for lossy performance, so only on when debugging
; How long-to-wait (in seconds) for a scheduled restart to begin if the cache
; is not being accessed.
opcache.force_restart_timeout=180 #缓存中没有被访问多长时间 (in seconds) to schedule a restart.
; Opcache error_log file name. Empty string assumes "stderr".
; opcache.error_log= #留空表示标准错误输出
; All Opcache errors go to the WEB server log.
; By default, only fatal errors (level 0) or errors (level 1) is logged.
; You can also enable warnings (Level 2), info messages (level 3) or
; Debug messages (Level 4).
; Opcache.log_verbosity_level=1 #所有OPcache错误导向Web服务器日志. By default, only fatal errors (level 0) or errors (level 1) are logged. You can also enable warning (requires Level 2), informational messages (Level 3), or debug messages (level four).
; Preferred Shared Memory back-end. Leave empty and let the system decide.
; Opcache.preferred_memory_model= #首选的共享内存的后端. Leave it blank and let the system decide.
; Protect the shared memory from unexpected writing during script execution.
; Useful for internal debugging only.
; Opcache.protect_memory=0 #在脚本执行期间保护的共享内存被意外写入. For internal debugging only.
This article is from the "Youth Deng Yong" blog, please be sure to keep this source http://dengyong.blog.51cto.com/8409869/1852388
PHP Accelerator Plugin-opcache Parameters