PHP accelerator configuration parameters

  • 2020-03-31 20:43:55
  • OfStack

Start. Eaccelerator.shm_size = "32"
The amount of Shared memory (in megabytes) that eAccelerator can use. "0" is the default value of the operating system. The default value is "0".

Start the cache_dir = "/ home/PHP/TMP"
This directory is for the disk cache. EAccelerator stores precompiled code, process data, content, and user-defined content here. The same data can be stored in Shared memory (for faster access). The default setting is "/ TMP/eAccelerator ".

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

Start. The optimizer = "1"
Turn on or off the internal optimizer to speed up code execution. 1" is on, "0" is off. The default value is "1".

Start. Check_mtime = "1"
Turn on or off PHP file modification checks. "1" means open and "0" means closed. If you recompile PHP files after modifications, you should set this to "1". The default value is "1".

Start. The debug = "0"
Turn debug logging on or off. 1" is on, "0" is off. The default value is "0". A cache hit is written to the log.

Start. The filter = ""
Determine which PHP files must be cached. You can specify both cached and uncached file types (such as "*.php *.phtml")
If the argument starts with "!" At the beginning, the files that match these parameters are ignored. The default value is "", that is, all PHP files will be cached.
Start. Shm_max = "0"
When using the "eaccelerator_put()" function, it is prohibited from storing too large a file in Shared memory. This parameter specifies the maximum allowable storage in bytes (10240, 10K, 1M). 0" is unrestricted. The default value is "0".

Eaccelerator.shm_ttl = "0"
When eAccelerator fails to get the Shared memory size of a new script, it removes all script caches that were not accessed in the last "shm_ttl" seconds from the Shared memory. The default value is "0", that is, no cache files are deleted from the Shared inner spring.

Start. Shm_prune_period = "0"
When eAccelerator fails to get the Shared memory size of a new script, he will attempt to remove the cached script from Shared memory that is seconds older than "shm_prune_period". The default value is "0", that is, no cache files are deleted from the Shared inner spring.

Start. Shm_only = "0"
Allows or disables caching of compiled scripts on disk. This option is not valid for session data and content caching. The default value is "0", that is, using disk and Shared memory for caching.

Eaccelerator.com press = "1"
Allows or disables compressed content caching. The default value is "1", i.e., compression is allowed.

Eaccelerator.com press_level = "9"
Specifies the compression level of the content cache. The default value is "9", which is the highest level.

Start. The keys = "disk_only"
Start. The session = "disk_only"
Start. The content = "disk_only"
Set the storage place of the content cache, which can be set as:
Shm_and_disk in Shared cache and hard disk (default)
Shared memory exists in SHM by default. If the Shared memory is full or exceeds the value of "eaccelerator.shm_max", it is saved to the hard disk
Shm_only is stored in Shared memory only
Disk_only is stored on the hard disk
None does not cache data

Start. 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 site and use it to view and manage it

Finally, take a look at my eAccelerator setup
 
; eaccelerator 
[eaccelerator] 
zend_extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so" 
eaccelerator.shm_size="128" 
eaccelerator.cache_dir="/tmp/eaccelerator" 
eaccelerator.enable="1" 
eaccelerator.optimizer="1" 
eaccelerator.check_mtime="1" 
eaccelerator.debug="0" 
eaccelerator.filter="" 
eaccelerator.shm_max="0" 
eaccelerator.shm_ttl="3600" 
eaccelerator.shm_prune_period="3600" 
eaccelerator.shm_only="0" 
eaccelerator.compress="1" 
eaccelerator.compress_level="9" 
eaccelerator.keys = "disk_only" 
eaccelerator.sessions = "disk_only" 
eaccelerator.content = "disk_only" 
eaccelerator.allowed_admin_path = "/var/www/html/21andy.com/eaccelerator" 

Also, talk about the eAccelerator installation

Wget # http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6.tar.bz2
# tar - JXVF start - 0.9.6. Tar..bz2
# CD start - 0.9.6
# / usr/local/PHP/bin/phpize
#. / configure -- enable - start = Shared - with - PHP - config = / usr/local/PHP/bin/PHP - config
Make && make install

Related articles: