Messages in this thread | | | Date | Sat, 24 Apr 1999 14:37:03 +0200 | From | Andi Kleen <> | Subject | Re: Linus on Linux, Apache and Threads |
| |
On Sat, Apr 24, 1999 at 02:35:59PM +0200, Alex Belits wrote: > On 24 Apr 1999, Andi Kleen wrote: > > > > > You have multiple threads doing an accept on a single listen socket. As > > soon as a thread finished work it calls accept and gets the next ready > > connection handed from the kernel. > > ...or will be awakened on the connection that was handled by another > thread (because of "wake everyone" handling), and accept() will fail, > causing the infamous "thundering herd".
If the load is high enough it doesn't matter, because there will be always enough connections to be returned to an accept after a wakeup. If it isn't the threads pool should adapt and use less threads which avoids the problem (and a few lost wakeups in the transitions don't harm, because the machine has enough free cycles).
Do you have any real data that this doesn't happen?
-Andi -- This is like TV. I don't like TV.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |