Re: Byte hit ratio...negative?

From: Duane Wessels <wessels@dont-contact.us>
Date: Sun, 12 Dec 1999 16:58:38 -0700

On Sun, 12 Dec 1999, Chris Conn wrote:

>
> Hello,
>
> Can someone explain this to me: How is this possible?
>
> Cache information for squid:
> Request Hit Ratios: 5min: 48.2%, 60min: 46.5%
> Byte Hit Ratios: 5min: -6.0%, 60min: 14.3%
> Storage Swap size: 13519234 KB
> Storage Mem size: 175112 KB
>
> I am baffled. It sometimes goes up to 30%, then drops to -6% or less.

New FAQ for you:

  12.31. Why do I see negative byte hit ratio?

  Byte hit ratio is calculated a bit differently than Request hit ratio.
  Squid counts the number of bytes read from the server-side, and the
  number of bytes written to the client-side. The byte hit ratio is
  calculated as

          (client_bytes - server_bytes) / client_bytes

  If server_bytes is greater than client_bytes, you end up with a nega-
  tive value.

  The server_bytes may be greater than client_bytes for a number of
  reasons, including:

  o Cache Digests and other internally generated requests. Cache
     Digest messages are quite large. They are counted in the
     server_bytes, but since they are consumed internally, they do not
     count in client_bytes.

  o User-aborted requests. If your quick_abort setting allows it,
     Squid sometimes continues to fetch aborted requests from the
     server-side, without sending any data to the client-side.

Duane W.
Received on Sun Dec 12 1999 - 17:09:45 MST

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