Home > Backend Development > PHP Tutorial > Detailed explanation of configuration parameters of PHP acceleration tool eAccelerator

Detailed explanation of configuration parameters of PHP acceleration tool eAccelerator

WBOY
Release: 2016-07-25 09:12:55
Original
1020 people have browsed it

eAccelerator configuration parameters: eaccelerator.shm_size="32" The amount of shared memory that eAccelerator can use (in megabytes). "0" refers to the default value of the operating system. The default value is "0". It can be adjusted according to the actual situation of the server, 16, 32, 64, 128 are all is allowed.

eaccelerator.cache_dir="/home/php/tmp" This directory is used for disk caching. eAccelerator stores precompiled code, process data, content and user-defined content here. The same data can also be stored in shared memory (which improves access speed). Default The setting is "/tmp/eaccelerator".

eaccelerator.enable="1" Turn eAccelerator on or off. "1" is on, "0" is off. The default value is "1".

eaccelerator.optimizer="1" Turning on or off the internal optimizer can improve code execution speed. "1" is on, "0" is off. The default value is "1".

eaccelerator.check_mtime="1" Turn on or off PHP's file modification checking. "1" means on, "0" means off. If you recompile PHP files after making changes, you should set this to "1". The default value is "1".

eaccelerator.debug="0" Turn debug logging on or off. "1" is on, "0" is off. The default value is "0". Records of cache hits will be written to the log.

eaccelerator.filter="" Determine which PHP files must be cached. You can specify cached and non-cacheable file types (such as "*.php *.phtml", etc.) If the parameters begin with "!", files matching these parameters are ignored from the cache. The default value is "", i.e. all PHP files will be cached. eaccelerator.shm_max="0" Disables the " eaccelerator_put() " function from storing excessively large files into shared memory when using it. This parameter specifies the maximum value allowed for storage, in bytes (10240, 10K, 1M). "0" means no limit. The default value is "0".

eaccelerator.shm_ttl="0" When eAccelerator fails to obtain the shared memory size for a new script, it removes all script caches from shared memory that have not been accessed in the last "shm_ttl" seconds. The default value is "0", which means no cached files are deleted from the share.

eaccelerator.shm_prune_period="0" When eAccelerator fails to obtain the shared memory size for a new script, it will attempt to remove cached scripts older than "shm_prune_period" seconds from shared memory. The default value is "0", which means no cached files are deleted from the share.

eaccelerator.shm_only="0" Allow or disable caching of compiled scripts on disk. This option has no effect on session data and content caching. The default value is "0", which means: use disk and shared memory for caching.

eaccelerator.compress="1" Allow or disable caching of compressed content. The default value is "1", which means compression is allowed.

eaccelerator.compress_level="9" Specifies the compression level for content caching. The default value is "9", the highest level.

eaccelerator.keys = "disk_only" eaccelerator.session = "disk_only" eaccelerator.content = "disk_only" Set the storage location of the content cache, which can be set to: shm_and_disk on shared cache and disk (default) shm has shared memory by default. If the shared memory is full or the size exceeds the value of "eaccelerator.shm_max", it will be saved to the hard disk. shm_only is only stored in shared memory disk_only only stored in hard disk none does not cache data

eaccelerator.allowed_admin_path = "/var/www/html/21andy.com/eaccelerator" This is the address of the control panel There is control.php in the installation package. You can copy it to any directory on the website and use it to view and manage. This must be specified, otherwise an error will occur when viewing cached content

My eAccelerator settings

  1. ; eaccelerator
  2. [eaccelerator]
  3. zend_extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so"
  4. eaccelerator.shm_size="128 "
  5. eaccelerator.cache_dir="/tmp/eaccelerator"
  6. eaccelerator.enable="1"
  7. eaccelerator.optimizer="1"
  8. eaccelerator.check_mtime="1"
  9. eaccelerator.debug="0"
  10. eaccelerator.filter=" "
  11. eaccelerator.shm_max="0"
  12. eaccelerator.shm_ttl="3600"
  13. eaccelerator.shm_prune_period="3600"
  14. eaccelerator.shm_only="0"
  15. eaccelerator.compress="1"
  16. eaccelerator.compress_level="9"
  17. eaccelerator.keys = "disk_only"
  18. eaccelerator.sessions = "disk_only"
  19. eaccelerator.content = "disk_only"
  20. eaccelerator.allowed_admin_path = "/var/www/html/21andy.com/eaccelerator"
Copy code

eAccelerator installation:

  1. # wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6.tar.bz2
  2. # tar -jxvf eaccelerator-0.9.6.tar.bz2
  3. # cd eaccelerator-0.9.6
  4. # /usr/local/php/bin/phpize
  5. # ./configure --enable-eaccelerator=shared --with-php-config=/usr/local/php/bin/php-config
  6. # make && make install
Copy code


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template