Re: [squid-users] cachemgr.cgi and OS do not agree

From: Duane Wessels <wessels@dont-contact.us>
Date: Tue, 13 Mar 2001 15:35:14 -0700 (MST)

On Tue, 13 Mar 2001, Stefan Berg wrote:

>
> Sorry for repost - but I had no response to my previous message and I really
> could use some help... :
>
> Hi,
>
> I'm experiencing a discrepancy in disk usage between what cachemgr.cgi
> (2.3STABLE4) reports and what my OS (RedHat Linux) reports.
>
> Here is what cachemgr.cgi reports:
> Storage Swap size: 11240894 KB
>
> Looking in my filesystem:
> # df -k
> Filesystem 1k-blocks Used Available Use% Mounted on
> /dev/hda1 608724 68108 509696 12% /
> /dev/hda8 17433512 13809956 2737976 83% /cache1
> /dev/hda6 806368 701292 64112 92% /usr
> /dev/hda7 396623 25848 350294 7% /var
> #
>
> So Squid says "you are using 11,2 GB", and my OS tells me "you are using
> 13,8 GB". A 2,6 GB diff!
>
> Fact is that I am also storing my squid logs on the same partition (about
> 285 MB worth) and of course there is the swap.state file (5,6 MB worth).
>
> So the difference is a little less - not 2,6 GB but rather 2,3 GB. But a
> MAJOR difference anyway.
>
> How is this possible? Today I deleted my swap.state file to make sure it
> wasn't corrupt, and I have also run fsck on the /cache1 partition without
> any problems found.
>
> Ideas? Please help me out here...

  12.35. Why is actual filesystem space used greater than what Squid
  thinks?

  If you compare df output and cachemgr storedir output, you will notice
  that actual disk usage is greater than what Squid reports. This may
  be due to a number of reasons:

  o Squid doesn't keep track of the size of the swap.state file, which
     normally resides on each cache_dir.

  o Directory entries and take up filesystem space.

  o Other applications might be using the same disk partition.

  o Your filesystem block size might be larger than what Squid thinks.
     When calculating total disk usage, Squid rounds file sizes up to a
     whole number of 1024 byte blocks. If your filesystem uses larger
     blocks, then some "wasted" space is not accounted.
Received on Tue Mar 13 2001 - 15:35:15 MST

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