httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@ntrnet.net>
Subject Re: Re[2]: perchild on FreeBSD 5?
Date Thu, 15 Aug 2002 15:06:56 GMT

> In view of this "It's impossible to tell which libs are thread safe"
> wouldn't it perhaps make sense to have a perchild version that uses
> processed instead of threads? I sure know that this would result in a
> insane amount of sleeping processes in a massive Virtualhosting setup
> but in my tests a very low end 500Mhz FreeBSD 4.6 box with 256MB RAM had
> no problem whatsoever with 2000 sleeping Apache processes belonging to 250
> DISTINCT instances of 1.3.26, all based upon different config files
> and running on different ports . Swap wasn't used and in idle state,
> the 2000 processes consumed less than 1.5% CPU...

While it is technicalloy possible to create a preforking server that
operates like perchild, it isn't a simple thing to do.  I would even go so
far as to say that it isn't something you really want.  If you want that
behavior, the best solution is to just run multiple Apache servers.  I
looked at every MPM before creating perchild, and the only one that made a
lot of sense for perchild was a static number of processes with a dynamic
number of threads per process.  If you have a dynamic number of processes,
then the parent process must always determine how many child processes
with each uid/gid exist currently.  If you are going to do that, you are
better off to just run two or three instances of prefork with an IP alias.


Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
550 Jean St
Oakland CA 94610
-------------------------------------------------------------------------------


Mime
View raw message