Eaccelerator on a MediaTemple DV

I'm currently wrapping up a fairly large Drupal 5 project. All the development is complete, caching is enabled as is CSS aggregation. I still need MORE speed! Enter Eaccelerator.

eAccelerator is a PHP accelerator derived from the MMCache extension for the PHP programming language. eAccelerator provides a bytecode cache. eAccelerator is open source and thereby free to use and distribute.

Every time a PHP script is accessed, PHP usually parses and compiles scripts to bytecode. Once installed, eAccelerator optimizes the compiled bytecode and caches this to shared memory or disk. Upon subsequent accesses to a script, eAccelerator will access cached bytecode if it is available instead of the script being compiled. This avoids the performance overhead of repeated parsing and compilation.

(Thanks Wikipedia!)

Installing E-accelerator is fairly cut and dry. Before installing one needs to make sure the server has "make" and "phpize" functioning. Google for instructions.

The following link provides the docs on that process. http://www.php.ph/2007/12/21/centos-5-eaccelerator-installation/ . The only portion that needs to be modified for MediaTemple is downloading the bz2 to a directory OTHER THAN /tmp.

Below is a copy of my eaccelerator.ini for reference:

[eaccelerator]
zend_extension="/usr/lib/php/modules/eaccelerator.so"
eaccelerator.shm_size = "0"
eaccelerator.cache_dir = "/var/cache/eaccelerator"
eaccelerator.enable = "1"
eaccelerator.optimizer = "1"
eaccelerator.debug = 0
eaccelerator.log_file = "/var/log/httpd/eaccelerator_log"
eaccelerator.name_space = ""
eaccelerator.check_mtime = "1"
eaccelerator.filter = ""
eaccelerator.shm_max = "0"
eaccelerator.shm_ttl = "0"
eaccelerator.shm_prune_period = "0"
eaccelerator.shm_only = "0"
eaccelerator.compress = "1"
eaccelerator.compress_level = "9"
eaccelerator.keys     = "shm_and_disk"
eaccelerator.sessions = "shm_and_disk"
eaccelerator.content  = "shm_and_disk"
eaccelerator.allowed_admin_path = ""

After it is installed restart Apache.

 
#mybox$ apachectl graceful

To verify Eaccelerator is working run the code below. You should see some of the ini config variables.

#mybox$ php -i |grep eaccelerator