So I have AuthCache installed with XCache but I am not getting any noticeable speed. Im on D6 so its not possible to use APC? I mean if APC is installed on the server , will Drupal use it even if I don't install the APC module?


  • 1
    Can you expand on what your problem and expectations are? Are you seeing overhead from sessions that you would like to fix, or are you hoping that xcache and/or apc will give a general improvement through opcode caching?
    – mpdonadio
    Commented Jan 13, 2012 at 2:36
  • I was hoping XCache and/or APC can somehow speed things up on my Drupal 6 website although I am still in the process of optimizing the site.
    – r2b2
    Commented Jan 13, 2012 at 6:48

3 Answers 3


Drupal, like any other PHP app will an APC opcode cache if it's available. Though there are a few settings that may prevent Drupal from using APC as it should.

First and foremost make sure APC has enough memory to work with. Drupal can eat up a ton of memory and if your APC cache is too small it may actually hurt your performance.

The first memory relevant setting I would look at is the apc.shm_size. APC's defaults setting have never worked out of the box for any of my Drupal installs. On some servers I have this is as high as 512M.

apc.shm_size = <MB Allocated>

APC may not be caching .module and .inc files by default!

Depending on your setup, APC may not be caching .MODULE and .INC files at all. This means that the majority of Drupal's slowest code may never make it to the APC cache in the first place.

The fix? apc.filters

On many of my Ubuntu servers adding the following line to my apc.ini has an enormous performance impact on my Drupal installs.

apc.filters = "+module$,+php$,+inc$,-admin"

You may also want to monitor your APC cache using the apc.php script that's generally bundled with APC.

You can also use apc.php to verify that .module and .inc files are making it into your APC system cache.


APC is an opcode cache for PHP. When your webserver serve a PHP page, it'll first compile it and then execute it. APC cache the compiled code in order to avoid this extra steps and thus make PHP execution faster.

You can install APC on your server without the need of the related module and it will optimized Drupal speed. Don't forget to tweak the apc.ini configuration file by mainly increasing default memory especially if you have a lot of modules.
You can have some interesting statistics using the apc.php file provided with APC.

Some (old) benchmark for APC: Benchmarking Drupal with PHP op-code caches: APC, eAccelerator and XCache compared

  • APC also provides a user cache for storing whatever you want. The performance module, and possible some others, use it.
    – mpdonadio
    Commented Jan 13, 2012 at 2:18

Drupal is not aware of APC. If APC is running for your PHP code it should improove PHP execution times. Whether this makes a noticable difference for the performane of your Drupal installation is a different question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.