views:

9858

answers:

8

Im doing research on which one of these to use and I can't really find one that stands out. Eaccelerator is faster than APC, but APC is better maintained. Xcache is faster but the others have easier syntax.

Anyone have recommendations on which to use and why?

Thanks

+8  A: 

Check out benchmarks and comparisons:

here and here and there

Boris Guéry
+21  A: 

APC is going to be included in PHP 6, and I'd guess it has been chosen for good reason :)

It's fairly easy to install and certainly speeds things up.

David Caunt
good point. apc it is.
Galen
I've been weighing up these three and have decided to start testing with APC for this reason. The other two seem to have some stability issues too.
Steve Claridge
I've seen stability issues with all of them, but settled for APC and any problems we've had with it we've been able to resolve.
xkcd150
I've only run into three issues with APC, all of which were things under my control. 1) Don't let APC fill up. Make sure to allocate enough memory 2) Don't use apc_clear_cache() on an active server 3) APC doesn't really cope well with heavy lock contention -- don't try to write to a single key from multiple processes simultaneously.
Frank Farmer
+6  A: 

In the end I went with eAccelerator - the speed boost, the smaller memory footprint and the fact that is was very easy to install swayed me. It also has a nice web-based front end to clear the cache and provide some stats.

The fact that its not maintained anymore is not an issue for me - it works, and that's all I care about. In the future, if it breaks PHP6 (or whatever), then I'll re-evaluate my decision and probably go with APC simply because its been adopted by the PHP developers (so should be even easier to install)

gbjbaanb
+5  A: 

APC definitely. It's written by the PHP guys, so even though it might not share the highest speeds, you can bet on the fact it's the highest quality.

Plus you get some other nifty features I use all the time (http://www.php.net/apc).

Evert
Facebook is also a heavy user of APC -- they use gigabytes, if not terrabytes of APC cache. Many of the improvements they've made have been released back and integrated into the main version of APC.
Frank Farmer
You are thinking of memcached.
Evert
@Every FB try to hit a local APC cache before making a TCP/IP connection to memcached http://www.scribd.com/doc/4069180/Caching-Performance-Lessons-from-Facebook
Andy
Probably.. but when he's talking about improvements that have been released back, etc.. that's probably Memcache. Unless they've done the same with apc.
Evert
+2  A: 

I think APC is the way to go unless you are using Zend Optimizer on the site. APC is incompatible with Zend Optimizer so in that case you will need to go with something like eAccelerator.

gaoshan88
+1  A: 

I tested eAccelerator and XCache with Apache, Lighttp and Nginx with a Wordpress site. eAccelerator wins every time. The bad thing is only the missing packages for Debian and Ubuntu. After a PHP update often the server doesn't work anymore if the eAccelerator modules are not recompiled.

eAccelerator last RC is from 2009/07/15 (0.9.6 rc1) with support for PHP 5.3

devarni
A: 

APC is going to be included in PHP 6

is this really?

day trader
A: 

If you want PHP file caching only, you can use eAccelerator directly. Very easy to install and configure, and give great results.

But too bad, they removed the eaccelerator_put and eaccelerator_put from the latest version 0.9.6.

Yousf