From owner-freebsd-hackers@FreeBSD.ORG Sat Jun 7 16:42:58 2014 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4017639; Sat, 7 Jun 2014 16:42:58 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96F862D40; Sat, 7 Jun 2014 16:42:58 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WtJhp-000OMY-A1; Sat, 07 Jun 2014 16:42:57 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s57Ggsgt002656; Sat, 7 Jun 2014 10:42:54 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18gDAy3LXrPTI677Th97keD Subject: Re: Best practice for accepting TCP connections on multicore? From: Ian Lepore To: Adrian Chadd In-Reply-To: References: Content-Type: text/plain; charset="us-ascii" Date: Sat, 07 Jun 2014 10:42:54 -0600 Message-ID: <1402159374.20883.160.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Hackers freeBSD , Daniel Janzon , Dirk Engling , Igor Mozolevsky X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2014 16:42:58 -0000 On Sat, 2014-06-07 at 12:06 -0400, Adrian Chadd wrote: > On 7 June 2014 10:19, Igor Mozolevsky wrote: > > On 7 June 2014 01:53, Dirk Engling wrote: > > > >> > >> On Sat, 7 Jun 2014, Daniel Janzon wrote: > >> > >> Is there any better way than doing the accept() call in one thread and > >>> then > >>> dispatch it to a thread on another core with any user space method? > >>> > >> > > See C10K problem [1]. > > > > > > Why use accept() and not kevent()? You need to keep it portable? > >> > > > > Has anyone rebutted the threads better than events paper[2] yet? > > > > > > > > 1. http://www.kegel.com/c10k.html > > > > 2. > > https://www.usenix.org/legacy/events/hotos03/tech/full_papers/vonbehren/vonbehren.pdf > > Not likely; but that paper talks about a threading model that isn't > currently in use in popular UNIX operating systems. It also compares a > lightweight thread implementation with a lightweight server to an > event driven system with worker threads that acted pretty badly, > causing extremely bad memory use and context switching. > > We've all gotten better at programming since then. Yeah, when I glanced at the link and saw it was a cite of a 2003 paper, my gut reaction was "Yeah, it has been rebutted by 11 years of everyone just getting on with their lives and evolving absolutely everything that was tested into something completely different now." -- Ian