Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261753AbTKLFcQ (ORCPT ); Wed, 12 Nov 2003 00:32:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261758AbTKLFcQ (ORCPT ); Wed, 12 Nov 2003 00:32:16 -0500 Received: from willy.net1.nerim.net ([62.212.114.60]:5904 "EHLO w.ods.org") by vger.kernel.org with ESMTP id S261753AbTKLFcO (ORCPT ); Wed, 12 Nov 2003 00:32:14 -0500 Date: Wed, 12 Nov 2003 06:32:07 +0100 From: Willy Tarreau To: kirk bae Cc: linux-kernel@vger.kernel.org Subject: Re: So, Poll is not scalable... what to do? Message-ID: <20031112053207.GA9634@alpha.home.local> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 934 Lines: 25 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. 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/