Re: So, Poll is not scalable... what to do?

bill davidsen
2003-11-12T23:37:24Z

In article <20031112053207.GA9634@alpha.home.local>,
Willy Tarreau <willy@w.ods.org> wrote:
| On Tue, Nov 11, 2003 at 05:52:42PM -0600, kirk bae wrote:
| > If poll is not scalable, which method should I use when writing
| > multithreaded socket server?
|
| Honnestly, if you're using threads (I mean lots of threads, such as one
| per connection), I don't think that poll performance will be your worst
| ennemy. The first thing to do is to handle the task switching yourself
| either with a publicly available coroutine library or with one of your own.

It's not clear that with 2.6 this is necessary or desirable. I'll let
someone who worked on the new thread and/or futex development say more
if they will, but I'm reasonable convinced that in most cases the kernel
will do it better.
|
| Take a look here for more a comparison of several available methods :
|
| http://www.kegel.com/c10k.html
|
| epoll is compared to other methods with numbers here :
|
| http://www.xmailserver.org/linux-patches/nio-improve.html
|
| Cheers,
| Willy
|
| -
| To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
| the body of a message to majordomo@vger.kernel.org
| More majordomo info at http://vger.kernel.org/majordomo-info.html
| Please read the FAQ at http://www.tux.org/lkml/
|

--
bill davidsen <davidsen@tmr.com>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.