[ic] Which is best for performance/functionality mod_interchange or interchange under mod_perl

Mike Heins interchange-users@icdevgroup.org
Wed Oct 23 20:51:01 2002


Quoting Jeff Dafoe (jeff@badtz-maru.com):
> > >     I can think of one.  mod_perl creates these gargantuan apache
> processes.
> > > Unless you are running multiple servers, one of these monsters will be
> > > forked for every request, static or dynamic.
> >
> > No, not exactly correct. Apache pre-forks the server processes and they
> > handle MaxRequestsPerProcess pages before dying and being re-spawned.
> 
>     Not exactly correct either <g>.  If you look at how MinSpareServers and
> MaxSpareServers factor in you can see that a process can be killed before
> MaxRequestsPerProcess is reached, a new process is not necessarily spawned
> when one is killed, and when spawning does occurs on an incoming connection
> it is not necessarily just a single process.

Well, if we are trying to be exhaustively correct. 8-)

> 
> > Actually, if you have mod_perl enabled putting Interchange there will
> > save memory, for you don't have extra perl interpreters laying around.
> >
> > I am not saying that this is a performance win for sure. It will depend
> > on your setup and mix of static/dynamic pages. If you do something like
> have
> > Tux serve images, it will probably be a win though.
> 
>     The issue I have found is that modperl processes seem to chew memory
> like crazy, particularly if they are preloaded with a monster perl script.
> I don't know exactly what the memory footprint looks like in a modperl
> process, as far as how the code pages and data pages are laid out, but
> shared memory seems to become unshared alarmingly fast.  The 20-30 meg
> apache processes actually start using 20-30 megs often after just a few
> dynamic requests.

It isn't a problem to have them big -- as long as you are not swapping,
the overhead comes when they fork (and even then it is not that bad with
any modern OS that has copy on write).

With memory being the way it is these days, a few megabytes here and there
doesn't cause problems unless there are lots of page faults.

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.513.523.7621      <mike@perusion.com>

I am a great believer in luck, and I find that the harder I work
the more luck I have. -- Thomas Jefferson