Php acceleration tool eAccelerator configuration parameters _ PHP Tutorial

Source: Internet
Author: User
Detailed description of eAccelerator configuration parameters of php acceleration tool. The number of shared memory that eaccelerator. shm_size32eAccelerator can use (in megabytes). 0 refers to the default value of the operating system. The default value is 0. based on the actual situation of the server 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, and 64,128 are acceptable.

Eaccelerator. cache_dir = "/home/php/tmp"
This directory is used for disk cache. here, eAccelerator stores pre-compiled code, process data, content, and user-defined content. the same data can also be stored in the shared memory (this can increase the access speed ). the default value is "/tmp/eaccelerator ".

Eaccelerator. enable = "1"
Enable or disable eAccelerator. "1" is enabled, and "0" is disabled. The default value is "1 ".

Eaccelerator. optimizer = "1"
Enable or disable the internal Optimizer to speed up code execution. "1" is enabled, and "0" is disabled. The default value is "1 ".

Eaccelerator. check_mtime = "1"
Open or close the PHP file modification check. "1" indicates opening, "0" indicates closing. if you re-compile the PHP file after modification, you should set it to "1 ". the default value is "1 ".

Eaccelerator. debug = "0"
Enable or disable debugging logging. "1" is enabled, and "0" is disabled. The default value is "0 ". Logs will be written to the cache hit records.

Eaccelerator. filter = ""
Determine which PHP files must be cached. You can specify cache and non-cache file types (such as "*. php *. phtml)
If the parameter is set "! ", Files matching these parameters are ignored. The default value is "", that is, all PHP files will be cached.
Eaccelerator. shm_max = "0"
When the "eaccelerator_put ()" function is used, it is prohibited to store excessive files in the shared memory. This parameter specifies the maximum value that can be stored, in bytes (10240, 10 K, 1 M ). "0" is unlimited. The default value is "0 ".

Eaccelerator. shm_ttl = "0"
When the eAccelerator fails to obtain the shared memory size of the new script, it will delete all script caches that have not been accessed in the last "shm_ttl" seconds from the shared memory. The default value is "0". that is, no cached files are deleted from the shared files in the spring.

Eaccelerator. shm_prune_period = "0"
When the eAccelerator fails to get the shared memory size of the new script, it will try to delete the cache script earlier than "shm_prune_period" from the shared memory. The default value is "0". that is, no cached files are deleted from the shared files in the spring.

Eaccelerator. shm_only = "0"
Allow or disable caching compiled scripts on disks. This option is invalid for session data and content caching. The default value is "0", that is, the disk and shared memory are used for cache.

Eaccelerator. compress = "1"
Allows or disables content caching. The default value is "1", that is, compression is allowed.

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

Eaccelerator. keys = "disk_only"
Eaccelerator. session = "disk_only"
Eaccelerator. content = "disk_only"
Set the location where the content cache is stored. you can set it:
Shm_and_disk in shared cache and hard 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 is saved to the hard disk.
Shm_only is stored only in the shared memory.
Disk_only is stored on the hard disk
None

Eaccelerator. allowed_admin_path = "/var/www/html/21andy.com/eaccelerator"
This is the control panel address.
The installation package contains control. php. you can copy it to any directory on the website and use it to view and manage it. this must be specified. Otherwise, an error occurs when you view the cached content.

Finally, let's take a look at my eAccelerator settings.

The code is as follows:


; 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"


In addition, let's talk about installing eAccelerator.

# Wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6.tar.bz2
# Tar-jxvf eaccelerator-0.9.6.tar.bz2
# Cd eaccelerator-0.9.6
#/Usr/local/php/bin/phpize
#./Configure -- enable-eaccelerator = shared -- with-php-config =/usr/local/php/bin/php-config
# Make & make install

Http://www.bkjia.com/PHPjc/321909.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/321909.htmlTechArticleeaccelerator.shm_size= "32" eAccelerator can use the number of shared memory (in megabytes ). "0" refers to the default value of the operating system. the default value is "0 ". according to the actual situation of the server...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.