Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is using PHP accelerators such as MMCache or Zend Accelerator making PHP faster?

Does anybody have experience working with PHP accelerators such as MMCache or Zend Accelerator? I'd like to know if using either of these makes PHP comparable to faster web-technologies. Also, are there trade offs for using these?

like image 979
Kevin Avatar asked Aug 16 '08 00:08

Kevin


2 Answers

Note that Zend Optimizer and MMCache (or similar applications) are totally different things. While Zend Optimizer tries to optimize the program opcode MMCache will cache the scripts in memory and reuse the precompiled code.

I did some benchmarks some time ago and you can find the results in my blog (in German though). The basic results:

Zend Optimizer alone didn't help at all. Actually my scripts were slower than without optimizer.

When it comes to caches: * fastest: eAccelerator * XCache * APC

And: You DO want to install a opcode cache!

For example: alt text http://blogs.interdose.com/dominik/wp-content/uploads/2008/04/opcode_wordpress.png

This is the duration it took to call the wordpress homepage 10.000 times.

Edit: BTW, eAccelerator contains an optimizer itself.

like image 176
BlaM Avatar answered Oct 02 '22 11:10

BlaM


MMCache has been deprecated. I recommend either http://pecl.php.net/package/APC or http://xcache.lighttpd.net/, both of which also give you variable storage (like Memcache).

like image 38
airrob Avatar answered Oct 02 '22 10:10

airrob