On Tue, 2003-03-11 at 14:21, Lightfoot.Michael wrote: > > -----Original Message----- > > From: Gary Hostetler [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, 11 March 2003 11:21 AM > > To: [EMAIL PROTECTED] > > Subject: [squid-users] Changing cache location > > > > > > I want to change my cache from the default in squid to > > /home/cache where the partition size is 31 gigs and I want to > > reduce the cache size from 25 gigs to 21 gigs. When I tried > > it it failed. When I set it back to the default it wouldn't > > work until I put the original file size back in which was 25 > > gigs. I want to reduce to 21 gigs as recommended by some > > people (70% of partition) and set it to /home/cache/. Did I > > need to delete the default cache directory and how will that > > affect the swap file there. > > > The simplest is to blow away the current cache after changing squid.conf > and restart it all with squid -z. Others may confirm this, but I > suspect that you can't change the name of the cache directory and > preserve the cache unless you delete the swap.state file and let squid > rebuild it by reading every cache directory.
swap.state doesn't care about cache dir names. Squid's conf is what associates the state file with the cache dir. > You can reduce your cache size by changing the size in squid.conf then > waiting until squid unlinks enough files to reduce the size to what you > want. This naturally takes some time, squid will not simply start > deleting objects wholesale, it will gradually adjust itself to the new > regime. Pretty quickly actually: IIRC it'll unlink O(10) objects per IO cycle until the space has dropped to 95% of the squid.conf maximum. (At 200 IO cycles per second on an unloaded squid, thats 2000 objects per second). Rob -- GPG key available at: <http://users.bigpond.net.au/robertc/keys.txt>.
signature.asc
Description: This is a digitally signed message part
