httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jus...@erenkrantz.com>
Subject Re: [PATCH] mod_cache fixes: #8
Date Mon, 02 Aug 2004 18:04:22 GMT
--On Monday, August 2, 2004 8:46 AM -0400 Brian Akins <bakins@web.turner.com> 
wrote:

> Another big speed-up may be to pre-make all of the directories.  A simple
> script could use CacheRoot, |CacheDirLength|, and |CacheDirLevels to  create
> them all.  Just require that this script be ran before starting a
> mod_disk_cache server.  Or if you wanted, you could generate/check the
> directories in post_config.

post_config's not a bad place for that.  But, I've yet to get a good handle on 
my thoughts for the storage mechanism that mod_disk_cache is using.  My hunch 
so far is that it's really inefficient.  (The reading of the headers one-byte 
at a time with the brain-dead apr_file_gets() just *killed* performance.) 
And, there might be a way to also save the entire response headers and body 
and allow a straight sendfile from that.  My guess is that it'll be a slightly 
different cache module though - mod_cache does its best to play nice with the 
other filters.  An option to disregard them may make sense, but we'd really 
have to pay attention to the Vary header then...

> The Squid proxy cache requires you to create all the directories beforehand
> by running it with a specific switch.  This save a ton of checking for
> and/or making directories.

Sort of dislike the fact that you must pre-create the dirs.  Yet, I understand 
the point here.  The extra stat calls might end up being harmful.  Will chew 
on this and see if the dirs become a bottleneck or not.  -- justin

Mime
View raw message