Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently running php5 with APC, the latter with default configuration. However after setting up munin to monitor APC, I'm surprised by the results:

  • apc.shm_size: 30
  • apc.gc_ttl: 3600
  • apc.ttl: 0
  • Used: 14MB
  • Request rate: 100 requests/second
  • Fragmentation: 0
  • Hit ratio: 80% (dropping to 0 a few times per hour)

So the obvious question: how can I adapt the configuration to achieve a higher hitrate. I find it very strange that the available memory is not fully used which the hitratio is still below what I would expect.

Thank for any hints!

share|improve this question
up vote 0 down vote accepted

It turns out that my problem was caused by running PHP in CGI/FastCGI mode. PHP Processes spawned by this do not share the APC cache, and as such my monitoring results are completely incorrect.

To resolve this, I have configured my apache to start working with FPM/FastCGI for php using mod_fastcgi. PHP's CPU usage has dropped impressively and caching is now done properly!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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