Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have noticed (via the APC control panel) that on each refresh

  • The hit count rises and falls.
  • The hits vs misses values fluctuate wildly, on one view it will be at 99% hits, 1% misses. On the next 30% hits, 70% misses
  • Memory usage jumps around erratically.

Now I would expect that these values would only rises until the server or APC is restarted. Can anybody explain what is happening here?

The only explanation I can think of is that as I am running Apache (2.2.15) with CGI-FCGI there are multiple instances of APC running. On each refresh I am seeing the stats for a single instance. This seems to be confirmed by this question:

http://stackoverflow.com/questions/598444/how-to-share-apc-cache-between-several-php-processes-when-running-under-fastcgi

However, this is from 2009 so I am surprised there isn't a solution for this (assuming one is needed)

For reference by APC config is as follows:

extension=apc.so
[apc]
apc.cache_by_default=1 # disable by default.
apc.enabled = 1
apc.shm_segments = 1
apc.shm_size = 128
apc.max_file_size = 10M
apc.stat=1
share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.