httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: DSO support in Rhapsody, mapped files, and other fun
Date Wed, 05 Aug 1998 18:03:54 GMT

On Wed, 5 Aug 1998, Wilfredo Sanchez wrote:

>   I'm adding DSO support to Rhapsody (ie. Mac OS X Server), and I'm
> looking for advice. The problem I has is that our dynamic linker does
> not (yet) support the unloading of bundles.  It seems that when you
> launch apache, the parent process reads the config, which loads all the
> modules.  Then the children each fork and clear the configuration, which
> unloads all the modules, and the re-reads the config, which reloads the
> modules. (This seems pretty inefficient, but that's for later.) 

The double configuration is a feature.  Pretty much everyone stumbles into
it at some point.  (That, and discovering that -X respects
MaxRequestsPerChild are usually head scratchers ;) 

>   Since I probably can't get the linker unload support done any time
> soon, I'd like not to reload a module that's already been loaded. I can
> do this by caching module paths at load time and not redoing ones that
> are already loaded. Does that seem problematic? Seems like the only time
> this would really hurt is when you change a module's binary, which can
> be worked around by doing a hard restart of the server. 

Sounds like it would work.

>   But Joe seems to think that Apache is opening a file (eg. index.html)
> mmap'ing it, and then closing and unmapping it.  We're thinking that
> caching these mapped files would be righteously cool, in that it might
> really bump up performance.  Joe's getting his impressions from kernel
> traces, and not so much from looking at Apache code, so I'm wondering if
> Apache has a strategy for caching mapped files and where I might look
> for it, or if it's something we'd have to contribute. 

Apache is multiprocess.  Caching in every process would mean massive
numbers of different page tables... thrash thrash.  You can disable the
mmap() if your implementation isn't efficient enough.  Or you can tweak
the threshold at which it starts using mmap, search for MMAP_THRESHOLD. 
Use something like lmbench to figure out what the good threshold for your
system is.

BTW, just disabling mod_status doesn't remove the inefficiency of "Rule


View raw message