httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Edmundsson <>
Subject Re: mod_cache responsibilities vs mod_xxx_cache provider responsibilities
Date Thu, 14 Sep 2006 07:24:04 GMT
On Wed, 13 Sep 2006, Davi Arnaut wrote:

> I'm working on this. You may want to check my proposal at 

Will it be possible to do away with "one file for headers and one file 
for body" in mod_disk_cache with this scheme?

The thing is that I've been pounding seriously at mod_disk_cache to 
make it able to sustain rather heavy load on not-so-heavy equipment, 
and part of that effort was to wrap headers and body into one file for 
mainly the following purposes:

* Less files, less open():s (small gain)
* Way much easier to purge old entries from the cache (huge gain).
   Simply list all files in cache, sort by atime and remove the oldest.
   The old way by using htcacheclean took ages and had less useful
   removal criteria.
* No synchronisation issues between the header file and body file,
   unlink one and it's gone.

That's only one of many changes made, but I found it to be crucial to 
be able to have an architecture that's consistent without relying on 
locks. This made it rather easy to implement stuff like serving files 
that are currently being cached from cache, reusing expired cached 
files if the originating file is found to be unmodified, and so on.

But the largest gain is still the cache cleaning process.

The stuff is used in production and seems stable, however I haven't 
had any response to the first (trivial) patch sent so I don't know if 
there's any interest in this.

  Niklas Edmundsson, Admin @ {acc,hpc2n}      |
  Does the Little Mermaid wear an algebra?

View raw message