httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Steinmetz <...@domdv.de>
Subject Re: [PATCH] fix incorrect 304's responses when cache is unwritable
Date Sun, 07 Aug 2005 22:07:09 GMT
Colm MacCarthaigh wrote:
> For what it's worth though, htcacheclean itself has this massive bug,
> and does not do any directory cleanup, so your patch isn't alone in
> doing this.

The problem is that you can't remove directories with htcacheclean
without generating race conditions wrt. httpd.

Assume that htcacheclean removes the last entries from a directory and
then removes the directory. At the same time httpd wants to use the
directory as it was already there...

You'll be better off setting CacheDirLength and CacheDirLevels to
sensible values. Try:

CacheDirLength 1
CacheDirLevels 2

You can get at most 64^2 directories which is 4096 directories. Any
reasonable filesystem can stand that. Now assume an average of 500
cached objects per directory which the filesystem should easily manage.
I tend to believe that 2048000 cached objects is quite a lot. If the
size of these objects has an average of only 1KB you already have a
total cache size of 2GB.
Even if you tried 3 for CacheDirLevels it would be 262144 directories
maximum which should be still fine for any reasonable filesystem.
-- 
Andreas Steinmetz                       SPAMmers use robotrap@domdv.de

Mime
View raw message