httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Finch <...@dotat.at>
Subject Re: Proposal: Get rid of most accept mutex calls on hybrid server.
Date Tue, 11 May 1999 13:57:57 GMT
Dean Gaudet <dgaudet@arctic.org> wrote:
>On Mon, 10 May 1999, Tony Finch wrote:
>> Dean Gaudet <dgaudet@arctic.org> wrote:
>> >
>> >Actually, I suspect that we don't really want to interprocess lock at all
>> >in the multithreaded server.  We use non-blocking listening sockets, and
>> >pay the wake-all cost for the small number of processes (we're talking
>> >like 8 processes, right?) 
>> 
>> If there's a select collision isn't *every* process woken up (not
>> just the httpds)?
>
>I'm not sure what you mean...  if a kernel had only one global sleeping
>queue, yeah... but then there'd be no way for us to avoid thundering herd,
>since everything would be awakened at all times.  But kernels typically
>have a lot of sleeping queues... including one on every socket.

Sorry, I was too terse. The BSD network stack only has space for
keeping track of one pid select()ing on each socket. If more than one
child select()s on a listen socket at the same time the kernel cannot
keep track of them so it doesn't even try: it just marks a collision
and when a connection arrives on that socket it wakes up every process
in select().

Tony.
-- 
f.a.n.finch   dot@dotat.at   fanf@demon.net
Arthur: "Oh, that sounds better, have you worked out the controls?"
Ford:   "No, we just stopped playing with them."

Mime
View raw message