httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <hart...@ooo.lanl.gov>
Subject Re: Possible work this weekend...
Date Fri, 07 Jul 1995 12:38:38 GMT
 
> 3) A new strategy for managing the number of extant child processes:
> 
>    This would involve putting up a scoreboard for the child server
>    processes, indicating their state.  This would be a file in which
>    each child server has a few words to indicate its pid, and whether
>    it is waiting for a request.  This allows us to then do the
>    following:
> 
>    The root server periodically checks to see how many child servers
>    are waiting for a request.  If there are fewer than some set
>    "MinFree" value, it forks off a *single* new child, and then goes
>    to sleep for a little while.  

:  :   :   :


one system I was thinking of was..

  a) enable the mutual exclusion around all accepts (even on safe
systems such as SunOs and HPsUX).

  b) set a signal handler (maybe SIGHUP) in the children to be a
routine which they use to signal back to the parent that they are
waiting for another child to release the lock i.e. they are idle

  c) parent periodically signals the children to see which ones are
idle... if there are <X, it can spawn another child (X ~ 2 I think)

  d) each child is given an alarm timeout, so that if they wait for
say >3 seconds for the lock to release, they are allowed to shutdown
and die.  (if a child is idle for this long, it's almost certain that
the are too many children for the current request rate)

  e) parent detects dead children as it does now, but then uses the
above signalling to determine if the child needs replacing. The parent
will also know how many active children there are, and keep this above
some minimum and below some maximum at all times.

  f) when a child gets past the lock, it disables the alarm and
     SIGHUP handlers so that there's at least one child always ready
     to accept.



...maybe.  

rob

Mime
View raw message