quetz-mod_python-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jack Diederich" <jack_dieder...@email.com>
Subject Re: [mod_python] Using shared memory to do global persistence
Date Fri, 27 Jun 2003 19:28:59 GMT

  can we just post to the dev list and drop mod_python and
  private cc:s? 
 (I think everyone here subscribes to python-dev)

From: Jonathan Gardner <jgardner@smoothcorp.com>
> One more tremendous use would be shared modules, in the same way that mod_perl 
> handles it. At the time of start up, mod_perl loads all the modules you 
> specify in startup.pl, and these modules are shared among all the child 
> processes. This saves a ton of memory, and increases performance in things 
> like spawning new children.

This is quite possible, I implemented this for the 2.x
version of mod_python, check the mod_pythhon archives
list for patches if you are curious.  I'm still running
1.x apache in production so I haven't looked at doing the
same thing for apache2/mod_python3.  The obvious benefit is
that modules are only loaded once.  A side benefit is that
you can setup shared memory segments in the parent that
are then inherited by the kids, this makes it easier to
write cross-platform shared memory modules.  The Apache
shared memory pool in apache2.x is probably a better choice,
those guys have put effort into making it cross platform

The objection is that these modules will be _loaded as root_
because they will be loaded before the server drops to a
lower uid/gid and forks.  This isn't a huge deal if you are
being careful but you don't want a bad version of moinmoin
(or some 3rd party thing) overwriting global config files
or worse.  loading modules per-child removes the insecurity.
The patches never went in, but the original feeling was
this feature should be _disabled_ by default, and only
included as a compile-time option with glyphs and warnings
echoed during the compile that say "YOU'D BETTER KNOW WHAT


Sign-up for your own FREE Personalized E-mail at Mail.com

View raw message