httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Edmundsson <ni...@acc.umu.se>
Subject [PATCH] mod_disk_cache background copy
Date Sun, 08 Oct 2006 18:02:10 GMT

This patch implements copying a file in the background so the client 
initiating the caching can get the file delivered by 
read-while-caching instead of having to wait for the file to finish.

I'll attach it to bug #39380 as well, with less comments.

The method used here is rather crude, but works well enough in 
practice. It should suffice as a first step of implementing this 
functionality.

Known missing features:
* Documentation for the CacheMinBGSize parameter, the minimum file
   size to to do background caching. Typically set to what your backend
   can deliver in approx 250ms at normal load (given 200ms sleep loop).
* It doesn't set the stacksize for the background thread, it made
   stuff unloadable on AIX which probably means some symbol is missing
   in an export table somewhere.
* Testing of the forked variation. This has only had testing with the
   worker MPM on Unix.

Known areas of possible improvements:
* Figure out why the cleanup-function isn't run before the fd's are
   closed so the private pool can be removed.
* I suppose it's possible to use cross-threads-fd's with some
   setaside-magic instead of open new fd's in the bgcopy thread.
* Experiment with a separate copy-files-thread spawned at
   initialization for threaded environments.
* The forked thingie could probably use a few cleanups.

In practice I don't think those improvements will give much in terms 
of performance but it sure would be more elegant :)

/Nikke
-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se      |     nikke@acc.umu.se
---------------------------------------------------------------------------
  "It's funny how the Earth never opens up and swallows you when you want it to."
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Mime
View raw message