> > There are a few performance penalties when using Apache::Registry:
> >
> > * Scripts are compiled at first request instead of server start
> unless you
> > use something like Apache::RegistryLoader.  So, the first
> request per child
> > will be a little bit slower and you don't get to share memory
> between httpd
> > children.  (Memory sharing can be a big problem.)
>
> But it still shares all the modules you pre-load in the http.conf,
> right?  So how much memory is wasted depends on the size of the script
> in question, or more accurately on how big its data structures are?
> (including imported variables)

Correct -- if you preload modules in httpd.conf, you will most likely use
shared memory for those modules.  Of course, the memory page will be copied
to the child process if it is modified after forking.  This could happen
because the module allocates some memory, something else that shares the
memory page is modified, etc.  However, with Apache::Registry scripts, you
are loading code in the child process directly (with the exception of using
Apache::RegistryLoader) -- so there's no chance for any memory sharing.

- Kyle

Reply via email to