Configure APC for maximum hit rate

Posted by Steven De Groote on Server Fault See other posts from Server Fault or by Steven De Groote
Published on 2012-12-01T09:10:57Z Indexed on 2012/12/01 11:07 UTC
Read the original article Hit count: 228

Filed under:
|
|

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!

© Server Fault or respective owner

Related posts about configuration

Related posts about php5