eAccelerator

Last modified: February 8, 2006 - 17:59

From what I can tell eAccelerator is the best free php accelerator.

Here are my notes on how to set the control variables (in php.ini):

;linux 2.6 has 32meg limit. If you have the memory and lots of modules try to set even higher e.g to 64
eaccelerator.shm_size="32"

; people have suggested that putting this directory on a fast separate disk will help
; you shouldn't be generating that much activity on this disk anyway because of the shared memory configured above
eaccelerator.cache_dir="/Applications/MAMP/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"

; You can set this to 0 for production sites. 1 means checks modification times so you don't need to restart web server
; if you are editing your php. You aren't editing php scripts on live sites are you?
eaccelerator.check_mtime="1"

eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="3600"
eaccelerator.shm_prune_period="0"

; set this to 1 if you want to just use the memory cache: good if you have configured a large one
eaccelerator.shm_only="0"

eaccelerator.compress="1"
eaccelerator.compress_level="9"

It appears that if php is

Venkat-Rk - April 26, 2007 - 15:55

It appears that if php is running as cgi (instead of as mod_php- that is, an apache module), eaccelerator will not work even if it is installed. Meaning, no code will be cached. Is this correct?

----
Previously user Ramdak.

That is correct.

chrisd - April 27, 2007 - 04:51

That is correct.

eAccelerator works by caching the php page. If the handle to eAccelerator is released, so is the cache content. eAccelerator "can't live" without a main application loaded. All PHP accelerators (caching extensions) follow that rule. One solution is to run PHP in FASTCGI mode (a sort of mixture of mod and cgi or CGI with a persistency that you can configure). I actually run www.sitebuddy.com ( the only source of Windows binaries of the major PHP accelerators) in FASTCGI mode. Here is a quick article a wrote little while back on the issue:
http://www.sitebuddy.com/php/php_apache_fast_cgi_install

Cheers,
Chris
Take a break: Guide to France

eAccelerator and cPanel's Easy :: Apache

Gene Steinberg - September 1, 2008 - 18:35

I see that eAccelerator is incorporated in cPanel's Easy :: Apache feature. Are there special things you need to know before compiling, options to eliminate, etc?

Peace,
Gene Steinberg

 
 

Drupal is a registered trademark of Dries Buytaert.