Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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've been monitoring Squid using MRTG, and for some reason, I get, from time to time, significantly more http cache hits then requests.

Can this be explained? Do cache hits not count as a simple http request? I would guess requests should be the total of hit + miss ?

I'm using snmp to monitor this.


share|improve this question
up vote 0 down vote accepted

Is it possible there is confusion with the variable name? It is worth noting that you should be comparing cacheHttpHits and cacheProtoClientHttpRequests, not cacheServerRequests which is something else entirely.

share|improve this answer
I see. I was using CacheServerRequests indeed. Is it normal cacheProtoClientHttpRequests are very high? A lot higher then the cache hits ('cacheHttpHits'). I'll wait a few hours for mrtg to plot some more graphs – Tuinslak Oct 5 '09 at 14:40
I suppose it depends on what you mean by high. In an ideal world, you would want this to be as close to a 1:1 ratio with your cache hits as possible, but there are alot of different factors that would prevent that from happening such as type of data being cached, user traffic patterns, usage, cache size, etc – Charles Hooper Oct 5 '09 at 15:02

You are right, http requests turn into either hits or misses. You could find other kind of hits (related to HTTP requests, ICP messages between caches, the IP cache, etc.). I would suggest to use squidclient command to go deeper into internal squid statistics and understand what is really happening on squid (further than what you see from MRTG).

e.g: squidclient -h host -p 80 mgr:utilization

share|improve this answer
Thanks, I'll play a bit around with squidclient aswell. – Tuinslak Oct 5 '09 at 14:40

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.