溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

PHP加速插件-opcache參數詳解

發布時間:2020-07-04 15:56:02 來源:網絡 閱讀:1021 作者:鄧美男1989 欄目:web開發

PHP加速插件-opcache參數詳解


zend_extension=opcache.so    #這樣去加擴展


opcache.memory_consumption=128      #為opcache分配多少共享內存128M

opcache.interned_strings_buffer=8   #interned string的內存大小

opcache.max_accelerated_files=4000  #最大緩存的文件數目

opcache.revalidate_freq=300         #opcache自動檢測文件是否更新的周期,單位秒

opcache.fast_shutdown=1             ##如果啟用,快速關閉序列用于加速代碼

opcache.enable_cli=1                #是否在CLI(即命令行時)啟用opcache   1啟用



; Determines if Zend OPCache is enabled

;opcache.enable=0     #是否啟用opcache  1啟用


; Determines if Zend OPCache is enabled for the CLI version of PHP

;opcache.enable_cli=0    #是否在CLI(即命令行時)啟用opcache   1啟用


; The OPcache shared memory storage size.

;opcache.memory_consumption=64    #為opcache分配多少共享內存,單位M


; The amount of memory for interned strings in Mbytes.

;opcache.interned_strings_buffer=4    #interned string的內存大小


; The maximum number of keys (scripts) in the OPcache hash table.

; Only numbers between 200 and 100000 are allowed.

;opcache.max_accelerated_files=2000    #最大緩存的文件數目。實際上這個值會使用第一個大于你配置的數字的下列素數{ 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987 },如你將該值指定為400,則實際上該值為463.

; The maximum percentage of "wasted" memory until a restart is scheduled.

;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    #如果置為1,則將當前路徑加入到文件key中,以避免可能產生的同文件名的文件key沖突


; 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會自動檢測文件的時間戳(檢測周期為revalidate_freq),并根據文件的時間戳來更新opcode,如果置為0,則只能手動去重啟opcache或重啟webserver以使更新后的php文件生效


; 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自動檢測文件是否更新的周期,單位秒。如果是0,則每次請求時opcache都要進行檢測。當validate_timestamps為0時,本指令無效。


; Enables or disables file search in include_path optimization

;opcache.revalidate_path=0    #


; 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    #如果禁用,注釋不會被加載,就是不禁用,注釋也不會被應用程序加載


; If enabled, a fast shutdown sequence is used for the accelerated code

;opcache.fast_shutdown=0     #如果啟用,快速關閉序列用于加速代碼


; Allow file existence override (file_exists, etc.) performance feature.

;opcache.enable_file_override=0   #允許文件存在覆蓋(file_exists等)性能特性。


; A bitmask, where each bit enables or disables the appropriate OPcache

; passes

;opcache.optimization_level=0xffffffff    #位掩碼,每一位啟用或禁用相應的OPcache


;opcache.inherited_hack=1

;opcache.dups_fix=0       #為解決“cannot redecllare class" 時,可將其置為1


; The location of the OPcache blacklist file (wildcards allowed).

; Each OPcache blacklist file is a text file that holds the names of files

; that should not be accelerated. The file format is to add each filename

; to a new line. The filename may be a full path or just a file prefix

; (i.e., /var/www/x  blacklists all the files and directories in /var/www

; that start with 'x'). Line starting with a ; are ignored (comments).

;opcache.blacklist_filename=     #黑名單文件設置


; Allows exclusion of large files from being cached. By default all files

; are cached.

;opcache.max_file_size=0   #允許排除大文件緩存。在默認情況下所有文件緩存。


; Check the cache checksum each N requests.

; The default value of "0" means that the checks are disabled.

;opcache.consistency_checks=0    #每N個請求檢查緩存校驗,默認值“0”意味著檢查禁用。開啟檢查有損性能,所以僅在調試時開啟


; How long to wait (in seconds) for a scheduled restart to begin if the cache

; is not being accessed.

;opcache.force_restart_timeout=180    #緩存中沒有被訪問多長時間(以秒為單位)調度重啟。


; 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) are logged.

; You can also enable warnings (level 2), info messages (level 3) or

; debug messages (level 4).

;opcache.log_verbosity_level=1   #所有OPcache錯誤導向Web服務器日志。默認情況下,只有致命錯誤(0級)或錯誤(1級)被記錄。你也可以啟用警告(要求等級2),信息消息(3級)或調試消息(四級)。


; Preferred Shared Memory back-end. Leave empty and let the system decide.

;opcache.preferred_memory_model=    #首選的共享內存的后端。留空,讓系統決定。


; Protect the shared memory from unexpected writing during script execution.

; Useful for internal debugging only.

;opcache.protect_memory=0    #在腳本執行期間保護的共享內存被意外寫入。僅供內部調試。


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女