Stas Bekman <[EMAIL PROTECTED]> writes:

> 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.

Isn't that what I said?! :-)

If you take a large script, throw it at Apache::Registry, then you'll
be compiling the script every time the a diaghter respawns.

If you have your script largely preloaded when Apache starts spawning
daughters, then you don't have that overhead.

> 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.


-- 
Dave Hodgkinson,                             http://www.hodgkinson.org
Editor-in-chief, The Highway Star           http://www.deep-purple.com
      Apache, mod_perl, MySQL, Sybase hired gun for, well, hire
  -----------------------------------------------------------------

Reply via email to