I wanted to test the Memcache and APC modules. On a lightly lightly loaded server, with Varnish, the page generation time for a single request seemed more interesting than handling numerous request per second. I measured it with Drupal Devel module.
All services were on a single dedicated Centos server, 2GB ram, Apache prefork, fcgi, PHP 2.3, Mysql 5.1, on a fairly small and light Drupal 7 site. At all times page caching and block caching were off. Varnish caching was on (and Varnish module enabled), but Varnish cache was bypassed as I was logged in. The memcache.so php extension was loaded and one instance of memcached daemon was running. Tests were done by actitvating and deactivating modules, making necessary changes to settings.php as advised in module documentation.
RESULTS:
Times in ms to generate the front page of my site, after warming up cache, and repeating test several times, values vary by about 2ms.
Tests with php extension APC loaded, (acp.shm_size = 64M):
apc extension loaded, no contributed module for caching 360
apc extension loaded, memcache module enabled and set as default cache 310
apc extension loaded, apc module enabled and set as default cache 560
Tests with php extension APC disabled:
apc not loaded, no contributed cache module 300
apc not loaded, memcache module set as default cache 260
Tests with php extension eAccelerator loaded instead of APC:
eAccelerator loaded, no contributed cache module 225
eAccelerator loaded, memcache module set as default cache 230
Tests with php extension eAccelerator loaded as well as APC:
no contributed cache module 225
memcache module set as default cache varies 217-247
Can anyone explain this? Why is the APC extension slowing down php requests?
Would you expect the results to be different if tested with multiple requests per second?









