Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Theres APC, XCache, and EAccelorator. how do they differ from each other and how do they each work?

does APC and EAcc do cache to disk so EVERY php process can access it? while xcache works in memory for every php process? (running suphp here)

share|improve this question
(…) touches on a few of your questions and might provide some insight into how they differ. – calman Feb 9 '11 at 0:25

I never tried XCache or Eaccelerator, but I always use apc on my servers, it works very well with almost zero configuration on Debian. I made some benchmarks with the Zend Framework Quick Start in my blog, the post is in Italian, but the benchmarks is in English (it's a shell transcript).

Apc brings the average request time for the quick start home page from 67ms to 18ms on my server.

Update: AFAIK apc works with shared memory, so if you use apache with mod_php every apache process uses the same opcache and the total amount of memory used is the same. In order to use the same opcache also with php cli you must set apc.enable_cli to 1.

To look at some results you can use the provided apc.php script, it will show you the cache usage and you can see that the cache is used by every process (otherwise it would be pretty useless)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.