[offtopic] apache+mmap

Dean Gaudet (dgaudet-list-linux-kernel@arctic.org)
Wed, 30 Jul 1997 20:05:39 -0700 (PDT)


Well there was interest when this topic went around a month ago. I
finally found time last week to put the support into the core of apache
that would make a naive mmap module feasible. If you want to play with it
then go grab <http://www.arctic.org/~dgaudet/mmap/apache-mmap.tar.gz>,
which includes the module and the necessary 1.3a2-dev code base.

You should run pre-2.0.31-2 at least (and I'm unsure which 2.1.x version)
because Eric Schenk fixed a writev() performance issue for me in that
patch. The apache code now uses writev() in more cases than it did before
-- in particular, the first hunk of any file is combined with the headers
using a writev(). Without the kernel fix you'll end up seeing two packets
where one would suffice.

I haven't benchmarked it. I'm hoping someone else will do that legwork :)
There are two tunables, see src/mod_mmap.c. It'll appear in 1.3 release
in some form or another, and probably will be in the 1.3a2 alpha release.

This Apache code base is alpha. I'm sure it has features. Enjoy.

Dean

P.S. The module as is probably drops right into earlier versions of apache
as well. You just don't get the writev() combining with the headers, and
it might make some silly copies around in memory.