On 23 Jun 2000, David Hodgkinson wrote:

> 
> Justin <[EMAIL PROTECTED]> writes:
> 
> > What I think happens is the children die after their last request,
> > and apache does not kick off a new child straight away.. MinFree is
> > set to 2 .. as 12 becomes 11 becomes 10 becomes 9, my backend is
> > getting less and less powerful and more and more swamped. When
> > Apache does wakeup and spawn a new child, it takes many seconds
> > to interpret all the (large amount) of perl code and modules that
> > are not in the parent... up to 10 seconds now since its only getting
> > a fraction of the box.. this gives the unlucky user a dead browser.
> > Worse, the remaining alive servers are dieing faster now as they
> > handle more and more of the load, and rush towards 500 to contribute
> > to the same traffic jam of booting children.
>  
> I'd worry about the cranking up time. It sounds like you need to
> preload your modules in the parent process.
> 
> Stas - please correct me if I'm wrong here, but preloading modules in
> startup.pl (or whatever) _does_ make a difference to the spawning time
> of an Apache daughter?

It makes no difference to the spawning time, since all the code is shared
at the beginning. When a new process is spawn 99.9% of the memory pages
are shared with parent. When the pages are getting dirty (some data
modified) a copy-on-write happen which slows things down, but it has
nothing to do with child spawning. The slowdown happens during the
request's processing.

If you don't preload your code, the first time a script need it the delay
of load and compilation will happen and there will be less memory shared.

_____________________________________________________________________
Stas Bekman              JAm_pH     --   Just Another mod_perl Hacker
http://stason.org/       mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]   http://perl.org     http://stason.org/TULARC
http://singlesheaven.com http://perlmonth.com http://sourcegarden.org


Reply via email to