PHP acceleration Tool eaccelerator Configuration Parameters detailed

Source: Internet
Author: User

Eaccelerator configuration parameters: eaccelerator.shm_size= The number of shared memory (in megabytes) that can be used by the eaccelerator. "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 are OK.

Eaccelerator.cache_dir= "/home/php/tmp" This directory is used for disk caching. Eaccelerator stores pre-compiled 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" turns the eaccelerator on or off. "1" is on, "0" is off. The default value is "1".

Eaccelerator.optimizer= "1" to start or close the internal optimizer, you can increase the speed of code execution. "1" is on, "0" is off. The default value is "1".

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

eaccelerator.debug= "0" To turn debug logging on or off. "1" is on, "0" is off. The default value is "0". Records are written to the log when the cache is hit.

Eaccelerator.filter= "" To determine which PHP files must be cached. You can specify the cached and non-cached file types (such as "*.php *.phtml", etc.) if the parameter starts with "!", the file that matches these parameters is ignored by the cache. The default value is "", that is, all PHP files will be cached. eaccelerator.shm_max= "0" Prevents files that are too large to be 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 failed 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 shared memory. The default value is "0", which is: Do not delete any cache files from the share inner spring.

eaccelerator.shm_prune_period= "0" when Eaccelerator failed to get the shared memory size of the new script, he will attempt to remove the cache script that is older than "shm_prune_period" seconds from shared memory. The default value is "0", which is: Do not delete any cache files from the share inner spring.

Eaccelerator.shm_only= "0" allows or disables the caching of compiled scripts on disk. This option is not valid for session data and content caching. The default value is "0", which is: Use disk and shared memory for caching.

Eaccelerator.compress= "1" allows or disables the compression of the content cache. The default value is "1", which is: Allow compression.

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" sets the place where content caches are stored, Can be set to: Shm_and_disk in shared cache and hard disk (default) SHM shared memory By default, if the shared memory is full or the size exceeds the value of "Eaccelerator.shm_max", it is stored on the hard disk shm_only only in shared memory Disk_ Only stored on HDD 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 on the website, you can use it to view and manage it, this must be specified, otherwise, when viewing the contents of the cache error

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
  • 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.