[ To:/Cc: lines adjusted ]
On Wed, Dec 13, 2000 at 08:49:26PM -0600, Nathan Lewis wrote:
> This is a documented bug in 2.3Stable3. It is described along with a patch at:
>
> http://www.squid-cache.org/Versions/v2/2.3/bugs/#squid-2.3.stable3-storeExpi
> redReferenceAge
> or you can just upgrade to 2.3Stable4
I am using 2.3.STABLE4 (in fact it's a squid-2.3-200011140000).
I did some analysis of my "debug" logfiles this night and I *think*
I have found the problem. I am still watching the cache and the stats,
but it looks good so far.
It's not really a bug IMHO. It's a mixture of configuration and
design problem:
What I did find out is that squid was spending really a lot of time
cleaning empty directories.
Currently I have
cache_dir ufs /share/zuse2/disk02/squid/cache 12000 32 256
cache_dir ufs /share/zuse2/disk03/squid/cache 12000 32 256
cache_dir ufs /share/zuse2/disk05/squid/cache 12000 32 256
cache_dir ufs /share/zuse2/disk06/squid/cache 12000 32 256
That makes 4 * 32 * 256 = 32768 directories. I had 64 instead
of 32 before which made it even worse.
The squid - with 50 GB cache - has currently about 3.7 million files
Each L2 directory takes up 256 files and they are not spread across the
L1/L2 directories but filled up from "bottom".
256 L2 directories * 256 files = 65536 files. So 3.7 million objects
fill up 56 L1 directories completely. This in turn means (as I have
4 cachedirs) that 14 L1 directories of each cache_dir are really
filled (in fact it's a little more (about 20 L1), as they are not all filled
completely due to removals). This means that I have 12288 unused L2
directories in my cache.
Now there is a hardcoded timeout of 15 seconds that seems to take effect
in case squid cleaned an "empty" directory, which causes squid to
simply sleep 2 whole days cleaning the empty L2 directories.
(This 15 seconds value occurs two times in store_dir_ufs.c).
That way squid seems to not to be able to keep pace in cleaning up
unused files from the filled directories.
What I did tonight is change the 15 seconds timeout to a 5 seconds
timeout and since that two things happend:
1) squid statistics show that it doesn't "loose objects", i.e. the
object count and disk usage reported by squid keep constant.
2) disk usage shows a decrease (about 4 % in 8 hours - from 98% to 94%)
Maybe some of the squid internals wizards can comment on this and tell
us if reducing the 15 seconds timeout to 5 seconds timeout is a bad
thing and the impact of this? Is it save to reduce the value even more?
I'll keep watching the evolution closely and keep you informed ;-)
\Maex
-- SpaceNet AG | http://www.Space.Net/ | Stress is when you wake Research & Development | mailto:maex-sig@Space.Net | up screaming and you Joseph-Dollinger-Bogen 14 | Tel: +49 (89) 32356-0 | realize you haven't D-80807 Muenchen | Fax: +49 (89) 32356-299 | fallen asleep yet. -- To unsubscribe, see http://www.squid-cache.org/mailing-lists.htmlReceived on Thu Dec 14 2000 - 08:01:42 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:56:58 MST