From owner-freebsd-questions@FreeBSD.ORG Thu Nov 15 14:11:56 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 57DC53EC for ; Thu, 15 Nov 2012 14:11:56 +0000 (UTC) (envelope-from freebsd@suki.ishpeck.net) Received: from suki.ishpeck.net (67-222-225-246.static.orml012.digis.net [67.222.225.246]) by mx1.freebsd.org (Postfix) with SMTP id 0E6118FC12 for ; Thu, 15 Nov 2012 14:11:55 +0000 (UTC) Received: (qmail 31344 invoked by uid 1031); 15 Nov 2012 14:11:55 -0000 Date: Thu, 15 Nov 2012 07:11:55 -0700 From: Anthony ''Ishpeck'' Tedjamulia To: Friedrich Locke Subject: Re: high performance server design approach Message-ID: <20121115141155.GC13837@suki.ishpeck.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 14:11:56 -0000 On Tue, Nov 13, 2012 at 08:23:38AM -0200, Friedrich Locke wrote: > 0) To have a single process "accepting" incoming connection on port 80 and > send the new socket fd to one of the http server in a round-roubin manner, DJB's publicfile does something rather similar. http://cr.yp.to/publicfile.html You could spend all day wondering. But if you really want to know and not just argue, you should do as the author of that web server says: "Profile. Don't speculate." It may just be that context switches are not the real bottleneck in your service.