XCache vs APC PHP 5.4.x
Recently I decided to run some upgrades on my servers, and go up to PHP 5.5. I’ve been using APC for a while (convenience) – usually is also bundled with all available repositories, or you can just grab it via PECL. Before that I was always with XCache. But… as long APC is no lonager maintained (last upgrade 2012) I make a call about going to XCache. Run some benchmarks, and here what we got.
2.3 GHz Intel Core i7 – 8GB of ram, SSD drives. Website which I was benchmarking was a have WordPress installation with multiple running scripts.
ab -n 100 -c 20
Here is what I got:
|apache 1st||apache 2nd||XCache 1st||XCache 2nd||APC 1st||APC 2nd|
|Time taken for tests [seconds]||11.11||11.11||9.029||9.073||5.474||5.343|
|Requests per second [#/sec] (mean)||9||9||11.08||11.02||18.27||18.72|
|Time per request: [ms] (mean)||2221.978||2221.978||1805.76||1814.617||1094.74||1068.568|
|Transfer rate:[ms] (mean, across all concurrent requests)||111.099||111.099||90.288||90.731||54.737||53.428|
|Transfer rate[Kbytes/sec] received||420.67||420.67||517.63||515.11||853.83||874.73|
Surprisingly XCache is much slower then APC – I was expecting better results, but as long we are losing support for APC in PHP 5.5 doesn’t make any sense to keep it runing.