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

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.

Cheers

share|improve this question

2 Answers 2

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

 
discard

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.