PHP speed-up Tool eaccelerator Configuration parameters detailed _php example

Source: Internet
Author: User
Tags bz2
"Eaccelerator.shm_size="
Eaccelerator The amount of shared memory that can be used (in megabytes). "0" refers to the default value of the operating system. The default value is "0". can be adjusted according to the actual situation of the server, 16,32,64,128 can be.

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 can improve access speed). The default setting is "/tmp/eaccelerator".

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

eaccelerator.optimizer= "1"
The internal optimizer can be turned on or off to increase code execution speed. "1" is turned on, "0" is closed. The default value is "1".

eaccelerator.check_mtime= "1"
Turn on or off the file modification check for PHP. "1" means to open, "0" means to close. If you recompile the PHP file after the modification, you should set it to "1". The default value is "1".

eaccelerator.debug= "0"
Turn debug logging on or off. "1" is turned on, "0" is closed. The default value is "0". Writes a cache hit record to the log.

eaccelerator.filter= ""
Determine which PHP files must be cached. You can specify the cached and not cached file types (such as "*.php *.phtml", and so on)
If the arguments begin with "!", the files that match the parameters are ignored. The default value is "", that is, all PHP files will be cached.
eaccelerator.shm_max= "0"
Prevents large files from being stored in shared memory when the Eaccelerator_put () function is used. This parameter specifies the maximum value that is allowed to be stored, in bytes (10240, 10K, 1M). "0" is not limited. The default value is "0".

eaccelerator.shm_ttl= "0"
When Eaccelerator fails to get the shared memory size of the new script, it deletes all script caches that were not accessed in the last "Shm_ttl" seconds from the shared memory. The default value is "0", which means that no cached files are deleted from the shared spring.

eaccelerator.shm_prune_period= "0"
When Eaccelerator fails to get the shared memory size of the new script, he attempts to remove cache scripts older than "Shm_prune_period" from shared memory. The default value is "0", which means that no cached files are deleted from the shared spring.

eaccelerator.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", which is to use disk and shared memory for caching.

eaccelerator.compress= "1"
Allows or disables the compression of content caching. The default value is "1", which is: Allow compression.

eaccelerator.compress_level= "9"
Specifies the compression level for 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"
The place where the content cache is stored can be set to:
Shm_and_disk in shared cache and hard disk (default)
SHM shared memory exists by default, if shared memory is full or size exceeds "Eaccelerator.shm_max" value, save to hard drive
shm_only only stored in shared memory
Disk_only is only stored on the hard drive
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 a control.php in the installation package, you copy it to any directory in the website, you can use it to view and manage, this must be specified, otherwise there will be error when viewing the cached content

Finally, take a look at my eaccelerator settings
Copy Code code 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"

Besides, the installation of 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

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.