0

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

Tuinslak
  • 1,465
  • 8
  • 32
  • 56

2 Answers2

0

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.

Charles Hooper
  • 1,520
  • 9
  • 8
  • 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 05 '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 05 '09 at 15:02
0

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

caguado
  • 16
  • 1