Re: 1.2 Cache Size (again)

From: Mark Cooke <mpc@dont-contact.us>
Date: Fri, 29 May 1998 12:01:47 +0100 (BST)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 28 May 1998, Duane Wessels wrote:

> Mark Cooke writes:
>
> >/dev/hda5 247871 216025 31846 87% /usr/squid/cache
>
> ...
>
> >1998/05/26 17:32:11| WARNING: Disk space over limit: 157363 KB > 153600 KB
>
> Hi Mark,
>
> I just thought of something you can try. Squid-1.2 will rebuild
> the cache state by reading the directories if your swap.state
> file is lost. So, you could
>
> 1. shutdown squid
> 2. rm /usr/squid/cache/swap.state
> 3. restart squid
>

Okay Duane,

At the last reboot before trying this:

1998/05/28 01:22:58| Done reading Cache Dir #0 swaplog (12060 entries)
1998/05/28 01:22:58| Finished rebuilding storage disk.
1998/05/28 01:22:58| 10164 Entries read from previous logfile.
1998/05/28 01:22:58| 0 Entries scanned from swap files.
1998/05/28 01:22:58| 0 Invalid entries.
1998/05/28 01:22:58| 0 With invalid flags.
1998/05/28 01:22:58| 8268 Objects loaded.
1998/05/28 01:22:58| 0 Objects expired.
1998/05/28 01:22:58| 1896 Objects cancelled.
1998/05/28 01:22:58| 0 Duplicate URLs purged.
1998/05/28 01:22:58| 0 Swapfile clashes avoided.
1998/05/28 01:22:58| Took 9 seconds ( 918.7 objects/sec).
1998/05/28 01:22:58| Beginning Validation Procedure
1998/05/28 01:23:00| Completed Validation Procedure
1998/05/28 01:23:00| Validated 8268 Entries
1998/05/28 01:23:00| store_swap_size = 130777k

So it appears squid believes it only has 130777K of cached data, even
though the squid partition is showing 216025K.

After trying your suggestion this morning:

1998/05/29 11:18:55| storeRebuildFromDirectory: DIR #0 done!
1998/05/29 11:20:36| Finished rebuilding storage disk.
1998/05/29 11:20:36| 0 Entries read from previous logfile.
1998/05/29 11:20:36| 9624 Entries scanned from swap files.
1998/05/29 11:20:36| 0 Invalid entries.
1998/05/29 11:20:36| 0 With invalid flags.
1998/05/29 11:20:36| 9317 Objects loaded.
1998/05/29 11:20:36| 0 Objects expired.
1998/05/29 11:20:36| 0 Objects cancelled.
1998/05/29 11:20:36| 552 Duplicate URLs purged.
1998/05/29 11:20:36| 0 Swapfile clashes avoided.
1998/05/29 11:20:36| Took 225 seconds ( 41.4 objects/sec).
1998/05/29 11:20:36| Beginning Validation Procedure
1998/05/29 11:20:36| CACHEMGR: <unknown>@127.0.0.1 requesting 'counters'
1998/05/29 11:20:36| CACHEMGR: <unknown>@127.0.0.1 requesting 'client_list'
1998/05/29 11:20:39| WARNING: Disk space over limit: 193453 KB > 153600 KB
1998/05/29 11:20:39| Completed Validation Procedure
1998/05/29 11:20:39| Validated 9070 Entries
1998/05/29 11:20:39| store_swap_size = 205609k
1998/05/29 11:20:49| WARNING: Disk space over limit: 199595 KB > 153600 KB
1998/05/29 11:20:59| WARNING: Disk space over limit: 197438 KB > 153600 KB
1998/05/29 11:21:09| WARNING: Disk space over limit: 190373 KB > 153600 KB
.
.
.
1998/05/29 11:22:19| WARNING: Disk space over limit: 153950 KB > 153600 KB

So it would appear Squid had lost 1896 objects somehow, and now it has
recovered them, it claims to have cleaned up. However, looking at the
disk usage, I have to disagree.

/dev/hda5 247871 216531 31340 87% /usr/squid/cache

After restarting again, squid is back to:

1998/05/29 11:28:23| Finished rebuilding storage disk.
1998/05/29 11:28:23| 3727 Entries read from previous logfile.
1998/05/29 11:28:23| 0 Entries scanned from swap files.
1998/05/29 11:28:23| 0 Invalid entries.
1998/05/29 11:28:23| 0 With invalid flags.
1998/05/29 11:28:23| 3727 Objects loaded.
1998/05/29 11:28:23| 0 Objects expired.
1998/05/29 11:28:23| 0 Objects cancelled.
1998/05/29 11:28:23| 0 Duplicate URLs purged.
1998/05/29 11:28:23| 0 Swapfile clashes avoided.
1998/05/29 11:28:23| Took 2 seconds (1863.5 objects/sec).
1998/05/29 11:28:23| Beginning Validation Procedure
1998/05/29 11:28:24| Completed Validation Procedure
1998/05/29 11:28:24| Validated 3727 Entries
e_swap_size = 139837k

and the cache size on disk is unchanged. Perhaps I'll go back to a
non-threaded compile when I build 1.2.21 in the near future. (Running
Linux 2.0.34 with glibc 2.0.7, Squid 1.2.20+patch at the moment)

The only other thing I can think of that might be different, is that I
have a cron job running, pulling cachemgr stats every five minutes
for MRTG, (http://www.sr.bham.ac.uk/~mpc/pulsar/monitor/index.shtml)
though I don't see how this could really be affecting things.

Cheers,

Mark

+-------------------------------------------------------------------------+
Mark Cooke The views expressed above are mine and are not
Systems Programmer necessarily representative of university policy
University Of Birmingham URL: http://www.sr.bham.ac.uk/~mpc/
+-------------------------------------------------------------------------+

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv

iQA/AwUBNW6Vonlbx4ZElNuLEQI7DwCfaJRX/LYZz9QfwqCw8uL/T3qbT5kAn3tV
5eqToE3hut6olpRpxtl/atoR
=h3EM
-----END PGP SIGNATURE-----
Received on Fri May 29 1998 - 04:11:38 MDT

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