Running high traffic sites powered with PHP applications is impossible without a PHP op-code cache / accelerators. Op-code caches speed up PHP applications by parsing and tokenizing PHP scripts once, and executing them faster for every subsequent request.
There are 3 popular open-source op-code caches:
Alternative PHP Cache (APC) is a free, open source framework that optimizes PHP intermediate code and caches data and compiled code from the PHP bytecode compiler in shared memory. APC is quickly becoming the standard PHP caching mechanism. It will be included built-in to the core of PHP starting with PHP 6.
eAccelerator was born 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 contained a PHP encoder and loader, but the development staff discontinued the encoder and removed this feature.
XCache is a fast, stable PHP op-code cacher that has been tested and is now running on production servers under high load. It is tested on Linux and supported under Windows, for thread-safe and non-thread-safe versions of PHP. This relatively new op-code caching software has been developed by mOo, one of developers of Lighttpd, to overcome some of the limitations of the existing solutions at that time; such as being able to use it with new PHP versions as they arrive.
I have done some benchmarks for all of them with Magento 1.4 installation and come to the following conclusions:
- All op-code caches provide a noticable improvement for Magento over a default PHP installation.
- The speed gain is about 2X.
- eAccelerator is better than the XCache or APC both in terms of speed and memory usage
- Installation of each op-code cache is different: XCache has a Debian package, eAccelerator is installed from source and APC is via PECL.