Re: very urgent help required !! please

From: Reuben Farrelly <[email protected]>
Date: Fri, 24 Mar 2000 19:17:06 +1100

Hi,

At Friday 12:38 PM 24/03/2000 +0500, Ahsan Khan wrote:
>Dear Parshant,
>
>
> The reason for dieing the squid is that you must have specified
> that size of cache_dir in squid.conf much bigger then the Original size
> of the filesystem Like if I have the 9 GB hd and its formatted and become
> 8.6 GB so my cache_dir size is 8GB not 8.6. Its no Standard But safe. Or
> This could be Problem of squid2.3 Stable release which is infect not
> stable till now, Please check squid home page for details.

You're quite wise to be safe with the cache_dir size. Look at this on my
(very) small cache:

cache_dir ufs /var/spool/squid 190 16 256 (I only have one, dedicated squid
partition)

Store Directory #0: /var/spool/squid
First level subdirectories: 16
Second level subdirectories: 256
Maximum Size: 194560 KB
LoWater Size: 155648 KB
Current Size: 155640 KB
Percent Used: 80.00% ****
Filemap bits in use: 12718 of 16384 (78%)
Removals: 2486
Scanned: 2507
Filesystem Space in use: 178275/199117 KB (90%) ****
Filesystem Inodes in use: 18880/51584 (37%)
Flags:

Note how the "Filesystem Space in use" is 90% yet "Percent used" is only
80%. So I agree, round down on the size of your cache_dir. Start lower
and up the cache_dir size if you find you have the space.

I'd be interested to know if anyone can come up with a reason for the
difference of the two values though. Intuition suggests to me that they
should be the same, but what I copied above suggests otherwise.

>swapt.stat file is located in your cache_dir and its unique for every
>cache dir.
>
>I will suggest that you should remove all the cache if possible and
>recreate the filsystem by unmounting them and then use mkfs to recreate
>them. after that mount them again and run squid -z and then restart squid.

What you are essentially suggesting is that he throw away his entire cache
just because his disk got a bit too full. That sounds a bit drastic. Why
not just lower the cache_dir size in squid.conf, delete a small number of
the subdirectories in your squid spool to free up 20MB or so (whatever it
takes to hold swap.state and a bit more) and then run squid -z to recreate
the directories.

If the swap.state file is also removed, squid will rebuild a new one - and
you'll have use of all those objects which would otherwise have been
wiped. Obviously you won't have use of the ones you have deleted.

By lowering the cache_dir line in squid.conf you should also find that when
squid starts, it immediately frees up space on the disk when it realises
that it's too far above your (new) high water limit.

I'm used to paying 12c/MB for all my traffic, so I have always tried to
find ways such as this to avoid trashing my entire cache :)

>With Regards
>Ahsan Khan

Reuben

-------------------------------------------------------------
Reuben Farrelly West Ryde, NSW 2114, Australia
Received on Fri Mar 24 2000 - 01:21:10 MST

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