XCache vs APC PHP 5.4.x

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.

Testing hardware:

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.

I run ab -n 100 -c 20

Here is what I got:

 apache 1stapache 2ndXCache 1stXCache 2nd APC 2nd
Time taken for tests [seconds]11.1111.119.0299.0735.474
Complete requests100100100100100
Failed requests6969694146
Requests per second [#/sec] (mean)9911.0811.0218.27
Time per request: [ms] (mean)2221.9782221.9781805.761814.6171094.74
Transfer rate:[ms] (mean, across all concurrent requests)111.099111.09990.28890.73154.737
Transfer rate[Kbytes/sec] received420.67420.67517.63515.11853.83

Surprisingly  XCache is much slower than 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 running.