I'm trying to improve performance under high load and would like to implement opcode caching. Which of the following should I use?
- APC - Installation Guide
- eAccelerator - Installation Guide
- XCache - Installation Guide
I'm also open to any other alternatives that have slipped under my radar.
Currently running on a stock Debian Etch with Apache 2 and PHP 5.2
[Update 1]
HowtoForge installation links added
[Update 2]
Based on the answers and feedback given, I have tested all 3 implementations using the following Apache JMeter test plan on my application:
- Login
- Access Home Page
With 50 concurrent connections, the results are as follows:
No Opcode Caching
APC
eAccelerator
XCache
Performance Graph (smaller is better)
From the above results, eAccelerator has a slight edge in performance compared to APC and XCache. However, what matters most from the above data is that any sort of opcode caching gives a tremendous boost in performance.
I have decided to use APC due to the following 2 reasons:
- Package is available in official Debian repository
- More functional control panel
To summarize my experience:
Ease of Installation: APC > eAccelerator > XCache
Performance: eAccelerator > APC, XCache
Control Panel: APC > XCache > eAccelerator