: This article mainly introduces PHP optimization-opcache configuration instructions. For more information about PHP tutorials, see.
[Opcache] zend_extension = "G:/PHP/php-5.5.6-Win32-VC11-x64/ext/php_opcache.dll"; Zend Optimizer + switch, turn off times code no longer optimized. opcache. enable = 1; Determines if Zend OPCache is enabled for the CLI version of PHPopcache. enable_cli = 1; Zend Optimizer + shared memory size, total number of pre-compiled PHP code that can be stored (unit: MB); 128opcache is recommended. memory_c; total memory occupied by Zend Optimizer + strings in the temporary storage pool. (Unit: MB); 8 opcache is recommended. interned_strings_buffer = 4; maximum number of cached files: 200 to 100000. Max_accelerated_files = 2000; when the memory "waste" reaches the corresponding percentage, a restart scheduling will be initiated. opcache. max_wasted_percentage = 5; when this command is enabled, Zend Optimizer + automatically appends the name of the current working directory to the script key to eliminate key-value conflicts between files with the same name. disabling this command will improve performance, but it will damage existing applications. opcache. use_cwd = 0; enable file timestamp verification opcache. validate_timestamps = 1; check file updates once in 2 S. note: 0 is always checked, not closed; 60opcache is recommended. revalidate_freq = 2; allows or disables optimization of file search in include_path; opcache. revalidate_path = 0; whether to save the file/function comments if Pigen, Doctrine, ZF2, and PHPUnit require file annotations. 0opcache is recommended. save_comments = 1; whether to load file/function comments; opcache. load_comments = 1; enable quick Shutdown. enabling this will increase the memory receiving speed when PHP Request Shutdown is enabled. we recommend that you use 1opcache. fast_shutdown = 1; allows overwriting the optimization features of the file (file_exists, etc .; Opcache. enable_file_override = 0; defines the number of optimization processes started; opcache. optimizati/span>; enabling this Hack temporarily resolves the "can't redeclare class" error .; opcache. inherited_hack = 1; enabling this Hack temporarily resolves the "can't redeclare class" error .; opcache. dups_fix = 0; sets a non-cache blacklist; does not cache php files starting with cache _ in the specified directory. /png/www/example.com/public_html/cache/cache_; opcache. blacklist_filename =; the large file cache is removed through the file size screen. by default, all files are cached .; opcache. max_file_size = 0; cache verification is performed every N requests. the default value 0 indicates that the check is disabled .; this command should be enabled closely during development and debugging because the calculation of the check value is detrimental to the performance .; opcache. c/span>; after the slave cache is not accessed, wait for a long time (in seconds) to schedule and restart; opcache. force_restart_timeout = 180; error log file name. leave null to use stderr ).; opcache. error_log =; write error messages to server (Apache, etc.) logs; opcache. log_verbosity_level = 1; the preferred backend for memory sharing. if this parameter is left blank, the system selects .; opcache. preferred_memory_model =; prevents accidental write during execution of the script in the share, which is only used for internal debugging .; opcache. protect_memory = 0
The above introduces the PHP optimization-opcache configuration instructions, including the content, hope to be helpful to friends who are interested in PHP tutorials.