On 14/09/2006, at 04:24, Niklas Edmundsson wrote:

On Wed, 13 Sep 2006, Davi Arnaut wrote:

I'm working on this. You may want to check my proposal at http:// verdesmares.com/Apache/proposal.txt

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

http://verdesmares.com/Apache/patches/016.patch


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.

/Nikke
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-=-=- Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se | [EMAIL PROTECTED] ---------------------------------------------------------------------- -----
 Does the Little Mermaid wear an algebra?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-=-=

Reply via email to