PHP Accelerators
PHP Accelerators/Cachers will boost the performance of your PHP applications, by caching the compiled form of php scripts to avoid the overhead of parsing and compiling the code every time the page is loaded. A PHP accelerator typically reduces server load and increases the speed of your PHP code by 1-10 times. Normally you will install these in the form of a php extension.
This list contains all the php accelerator solutions available at this time, with a short description and some personal notes. When choosing a php accelerator for your site, you should evaluate:
- evaluate the speed improvement. Normally any php application will gain at least 100% in speed only by installing any php accelerator, but you should do your own benchmark to see if it is useful or not.
- look for any problems caused by this. Your application might break or crash randomly after installing a php accelerator. The current solutions look pretty stable, but still this might happen.
Enough with the introduction… here we go (in alphabetic order…):
1. APC (Alternative PHP Cache) - http://pecl.php.net/package/APC
“APC is a free, open, and robust framework for caching and optimizing PHP intermediate code.”
Latest stable version: 3.0.12p2 (2006-09-05)
Download link: http://pecl.php.net/package/APC
Official installation help: inside the source
MyOpinion: recommended:
- stable
- works with all PHP versions including PHP5.1
- actively maintained
2. eAccelerator - http://eaccelerator.net/
“eAccelerator was born in December 2004 as a fork of the Turck MMCache project. Turck MMCache was created by Dmitry Stogov and much of the eAccelerator code is still based on his work. eAccelerator also contains a PHP encoder and loader. The latest release, 0.9.5, supports PHP 4 and all PHP 5 releases including 5.2. In older releases, the encoder will only work with PHP versions from the 4.x.x branch. eAccelerator will not work with any other versions of PHP.”
Latest stable version: 0.9.5 (2006-10-11)
Download link: http://bart.eaccelerator.net/source/0.9.5/
Official installation help: http://eaccelerator.net/wiki/InstallFromSource
MyOpinion: recommended:
- the latest version 0.9.5 works fine with PHP5.1
- actively maintained
- very good performance
3. XCache - http://trac.lighttpd.net/xcache/
“XCache is a fast, stable PHP opcode cacher that has been tested and is now running on production servers under high load. It is tested (on linux) and supported on all of the latest PHP cvs branches such as PHP_4_3 PHP_4_4 PHP_5_0 PHP_5_1 PHP_5_2 HEAD(6.x). ThreadSafe/Windows is also supported. It overcomes a lot of problems that has been with other competing opcachers such as being able to be used with new PHP versions.”
Latest stable version: 1.0.3-rc1 (2006-10-11)
Download link: http://210.51.190.228/pub/XCache/rc/1.0.3-rc1/
Official installation help: http://trac.lighttpd.net/xcache/wiki/InstallFromSource
MyOpinion: looks very interesting
- new kid on the block developed by mOo who is also a developer of Lighttpd.
- actively maintained (different releases stable/unstable/devel)
- many interesting features
- developed to overcome some of the limitations of the existing solutions at that time.
Others (commercial/discontinued, etc):
Zend Optimizer - http://www.zend.com/products/zend_optimizer
MyOpinion: closed source, not really an optimizer (normally you will not see a real performance improvement from this)… useful only for the encoder if needed by some commercial scripts.
Zend Platform - http://www.zend.com/products/zend_platform
MyOpinion: commercial product; more than an optimizer that has features that serious developers might find useful.
ionCube PHP Accelerator (PHPA) - http://www.php-accelerator.co.uk/
MyOpinion: discontinued, closed source.
Turck MMCache - http://turck-mmcache.sourceforge.net/index_old.html
MyOpinion: this was a great product and many peoples still use it even though it is now discontinued. The natural upgrade for newer versions of php is eAccelerator.
Conclusion: APC, eAccelerator and XCache are all great solutions that can speed up any php application. There are many benchmarks on the internet showing how one or the other is better, but I would suggest running your own tests and finding the one that fits best for your application.
From my experience their performance is very similar, and my personal favorite is eAccelerator, even though I have used APC for some projects also. At this time I am evaluating and testing XCache and the initial results look very good.
Keep in mind when you are installing a php accelerator that this is not the end of your php tunings and optimizations and you should look into optimizing the real application. The opcache is a nice addition that can quickly speed up your application but don’t forget about the application itself. You will be surprised that in real life the biggest improvements are done from the application and not by installing a php accelerator solution.
Share This








31st October 2006, 23:26
[...] PHP Accelerators | MDLog:/sysadmin (tags: eaccelerator php linux) [...]
1st November 2006, 00:20
[...] PHP Accelerators [...]
1st November 2006, 05:16
Great list!
Thanks for the article.
1st November 2006, 05:29
do you use these programs with wordpress?
1st November 2006, 06:09
I use one with Wordpress at least. eAccelerator. Simple to set up and use, and I haven’t had any issues after using 0.9.5 for a week now. Highly recommended.
1st November 2006, 09:08
I have experience with Zend Platform and Zend optimizer (last is not an accelerator).
Zend platform works very well. We tried APC, but it suddenly crashes sometimes, and corrupts the scripts…so if that happens your customers will not be pleased.
Zend Platform never does this.
Our site has over 15mill hits pr. day, with 10 webservers, and we cannot afford crashes.
If the accelerator starts to crash, you really want someone to fix it really fast. If you use a free accelerator, you can only hope that someone fixes it before you go bankrupt.
Zend optimizer actually does a very good job. Without it you must do really wierd tricks to be able to handle large amounts of data in loops and arrays. You don’t want to run a site without it. (or another extension that does the same as optimizer)
1st November 2006, 10:03
[...] Faldt lige over denne liste på digg.com, hvis der var nogle der skulle have interesse i det. [...]
1st November 2006, 13:23
[...] read more | digg story Filed under: Uncategorized | Tags: . [...]
1st November 2006, 14:59
nice metrics.
not.
1st November 2006, 15:54
I’m hearing a lot more about Zend, but I don’t think its free. And I think its quite expensive. Will definitely check out some of those other ones, if only I could get my host to install it.
1st November 2006, 16:50
[...] Anyways, today I bring you a collection of PHP caches and cheat sheets courtesy of Ducea.com and Smashingmagazine. [...]
1st November 2006, 19:18
Turbo Charging Admun…
Saw this on digg on a quick summary on PHP cache. So, give it a quick tryout.
Benchmark resulting:
admun blog: 0.34sec -> 0.26sec
admun NUDN: 0.16sec -> 0.10sec
default nucleus: 0.048sec ->……
2nd November 2006, 05:22
[...] PHP Accelerators | MDLog:/sysadmin Good round up of the big players in the PHP Accelerator market. Looks like eAccelerator wins by a nose. (tags: php cache accelerators performance) [...]
2nd November 2006, 09:36
[...] PHP Accelerators/Cachers will boost the performance of your PHP applications, by caching the compiled form of php scripts to avoid the overhead of parsing and compiling the code every time the page is loaded. [...]
2nd November 2006, 16:07
[...] read more | digg story Explore posts in the same categories: Web Hosting [...]
2nd November 2006, 16:26
[...] Articulo Original : http://www.ducea.com/2006/10/30/php-accelerators/#more-134 [...]
2nd November 2006, 23:33
[...] PHP Accelerators | MDLog:/sysadmin Heel nuttig als ge van een zware load af moet. (tags: php accelerator cache performance development) [...]
3rd November 2006, 23:34
[...] PHP Accelerators | MDLog:/sysadmin (tags: Platform_LAMP) [...]
4th November 2006, 02:18
[...] PHP Accelerators (tags: scalability performance accelerator cache) [...]
8th November 2006, 08:09
[...] PHP Accelerators/Cachers will boost the performance of your PHP applications, by caching the compiled form of php scripts to avoid the overhead of parsing and compiling the code every time the page is loaded. This list contains all the php accelerator solutions available at this time, with a short description and some personal notes.read more | digg story [...]
8th November 2006, 16:35
[...] Nice list of top accelerators and some personal experiences. [...]
23rd November 2006, 16:41
[...] A PHP accelerator typically reduces server load and increases the speed of your PHP code by 1-10 times. Normally you will install these in the form of a php extension. [...]
28th November 2006, 20:02
[...] PHP Accelerators/Cachers will boost the performance of your PHP … A PHP accelerator typically reduces server load and increases the speed of your PHP … This list contains all the php accelerator solutions available at this time, …Read more: here [...]
1st December 2006, 22:57
PHP 5.2 with eAccelerator issues segfaults for me
and errors like “cannot access the protected field” when I try to access protected variable from within the class.
14th December 2006, 19:08
[...] read more | digg story [...]
1st July 2007, 21:27
I have install xcache for my Forum
Performance:
portal.php 1.2s -> 0.2s
16th August 2007, 08:05
[...] read more | digg story Posted by seethepost Filed in news [...]
27th September 2007, 23:24
I have tested them all on various very busy sites.
Here is my .5:
- Use Zend, Ioncube only if required by compiled scripts, otherwise Zend may even slow down the execution and unnecessary increase apache child RAM usage;
- APC - good, but not PHP5 compatible
- eAccel - have some issues on very busy sites - especially with PHP5 and enabled disk cache.
- x-cache - my choice. Usually shows best performance in comparison, to improve stability - turn WriteProtection on, avg cache size 16M, no variable cache, garbage collection 900 sec. Speed’s up like a charm…
24th October 2007, 10:10
[...] php accelerator solutions available at this time, with a short description and some personal notes.read more | digg [...]
1st November 2007, 16:51
[...] read more | digg story [...]
30th January 2008, 09:57
[...] PHP accelerators [...]
16th March 2008, 01:45
[...] empresa Zend vende un acelerador pero hay implementaciones libre. Aqui hay una entrada con una comparación entre los aceleradores libres disponibles para PHP. Ya habÃamos probado el de [...]