Squid_ The Definitive Guide - Duane Wessels [140]
The Cache information section displays hit ratio and cache size statistics:
Cache information for squid:
Request Hit Ratios: 5min: 22.6%, 60min: 25.8%
Byte Hit Ratios: 5min: 24.6%, 60min: 38.7%
Request Memory Hit Ratios: 5min: 0.7%, 60min: 1.4%
Request Disk Hit Ratios: 5min: 6.0%, 60min: 12.4%
Storage Swap size: 41457489 KB
Storage Mem size: 10180 KB
Mean Object Size: 14.43 KB
Requests given to unlinkd: 0
Request Hit Ratios
Here, and on subsequent lines, you'll see two hit ratio numbers: one for the last five minutes, and one for the last hour. These values are simply the percentage of HTTP requests that result in a cache hit. Here, hits include cases in which Squid validates a cached response and receives a 304 (Not Modified) reply.
Byte Hit Ratios
Squid calculates byte hit ratio by comparing the number of bytes received from origin servers (or neighbors) to the number of bytes sent to clients. When received bytes are less than sent bytes, the byte hit ratio is positive. However, it is possible to see a negative byte hit ratio. This might occur, for example, if you have a lot of clients that abort their request before receiving the entire response.
Request Memory Hit Ratios
These values represent the percentage of all cache hits that were served from memory. Or, more accurately, the percentage of all hits (not requests!) logged as TCP_MEM_HIT.
Request Disk Hit Ratios
Similarly, these values represent the percentage of "plain" cache hits served from disk. In particular, these values are the percentage of all hits logged as TCP_HIT. You'll see that the memory and disk hit percentages don't add up to 100%. This is because the other cases (such as TCP_IMS_HIT, etc.) aren't included in either disk or memory hits.
Storage Swap size
The amount of data currently cached on disk. It is always expressed in kilobytes. To compensate for space wasted in partial blocks at the end of files, Squid rounds up file sizes to the nearest filesystem block size.
Storage Mem size
The amount of data currently cached in memory. It is always expressed in kilobytes and is always a multiple of Squid's memory page size: 4 KB.
Mean Object Size
Simply the storage swap size divided by the number of cached objects. You should set the configuration directive store_avg_object_size close to the actual value reported here. Squid uses the configured value for a number of internal estimates.
Requests given to unlinkd
The unlinkd process handles file deletion external to Squid (depending on your configuration). This value simply shows how many files Squid has asked unlinkd to remove. It is zero when unlinkd isn't used.
The Median Service Times section displays the median of various service time (or response time) distributions. You'll see a value for the last five minutes and for the last hour. All values are in seconds. Squid uses the median, rather than the mean, because these distributions often have heavy tails that can significantly skew the mean value. The output looks like this:
Median Service Times (seconds) 5 min 60 min:
HTTP Requests (All): 0.19742 0.15048
Cache Misses: 0.22004 0.17711
Cache Hits: 0.05951 0.04047
Near Hits: 0.37825 0.14252
Not-Modified Replies: 0.01309 0.01387
DNS Lookups: 0.05078 0.03223
ICP Queries: 0.00000 0.07487
HTTP Requests (All)
These are the median response times for all HTTP requests taken together. For an HTTP request, the timer starts as soon as Squid receives the request and ends when Squid writes the last byte of the response. Thus, this time also includes DNS lookups (if any), and ICP queries to upstream neighbors (if you have them) for cache misses.
Cache Misses
This line shows the response time for cache misses only. Unless your cache hit ratio is close to 50%, the cache miss response time is close to (but a little larger than) the