Re: Stats with calamaris.

From: David J N Begley <david@dont-contact.us>
Date: Mon, 8 Jun 1998 22:51:22 +1000 (EST)

On Mon, 8 Jun 1998, bill@nordnet.fr wrote:

> When we analyse logs file from squid box with calamaris,
> we obtain this :
[...]
> But when looking at mrtg (The Multi Router Traffic Grapher), the gain
> is only 5% between in/out traffic on the squid box's port.
> why this difference between the hit ratio and the analyze
> of the traffic ?

Without addressing specific numbers, remember when doing these comparisons
that Squid is measuring object data sizes but network-level devices
(Ethernet interfaces, switches, routers, &c.) are measuring everything,
including headers, retransmits, &c. - not all of which relate to object
sizes (and thus saved bytes per object).

You say "between in/out traffic on the squid box's port" - beware that if
this machine has only a single interface carrying all traffic to/from it
(incl. both local user requests and external Internet fetches) then you're
not really measuring the same traffic at all (unless you're doing
something with RMON2 and MRTG has been modified to do "selective"
counting of traffic); last time I looked, MRTG just read the "in" and
"out" byte values for a given interface, which clearly gives no regard for
where the traffic is going to or from.

You can't compare those numbers to the hit rates reported by Calamaris (or
any other Squid stats script). Calamaris is pretty good for determining
your cache saving (I don't think any stats script is going to be 100%
accurate given the differences between what Squid logs and what can happen
on a network, say with retransmits and whatnot); from your output:

- period 31.May 98 04:01:37 - 01.Jun 98 04:00:01

- total requests 633,301 (see "Sum" of "Request" column for "TCP-Request
  State"), you have no UDP requests so there's no need to factor that
  into the results

- total traffic 5,577,143 bytes (about 5.3Mb)

- Calamaris reports 30.09% byte hit-rate on your cache (ergo, your cache
  reduced your external traffic load by about one third what it would
  otherwise have been)

- To check, the bytes HIT were 1,678,129, so:

  (1678129 / 5577143) * 100 = 30.089402 (30.09)

- Why does total bytes less total direct bytes not match total hit bytes?
  Probably because some of the "direct" bytes are also errors (client
  abort) and whatnot, which aren't really savings nor regular misses.

For comparison, you're welcome to look at some of our stats (also produced
using Calamaris):

  http://www.nepean.uws.edu.au/cwis/usage/proxy/

Cheers..

dave
Received on Mon Jun 08 1998 - 05:59:05 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:40:39 MST