Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 40265 invoked from network); 11 Nov 2009 06:07:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Nov 2009 06:07:29 -0000 Received: (qmail 81712 invoked by uid 500); 11 Nov 2009 06:07:28 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 81628 invoked by uid 500); 11 Nov 2009 06:07:28 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 81619 invoked by uid 99); 11 Nov 2009 06:07:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2009 06:07:28 +0000 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [192.18.43.133] (HELO sca-es-mail-2.sun.com) (192.18.43.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2009 06:07:16 +0000 Received: from fe-sfbay-10.sun.com ([192.18.43.129]) by sca-es-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id nAB66sKb015602 for ; Tue, 10 Nov 2009 22:06:54 -0800 (PST) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-disposition: inline Content-type: text/plain; CHARSET=US-ASCII Received: from conversion-daemon.fe-sfbay-10.sun.com by fe-sfbay-10.sun.com (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul 2 2009)) id <0KSX00E00KVH0P00@fe-sfbay-10.sun.com> for dev@httpd.apache.org; Tue, 10 Nov 2009 22:06:54 -0800 (PST) Received: from lmonica2.home ([unknown] [129.150.241.74]) by fe-sfbay-10.sun.com (Sun Java(tm) System Messaging Server 7u2-7.04 64bit (built Jul 2 2009)) with ESMTPSA id <0KSX00E5UKZE8690@fe-sfbay-10.sun.com> for dev@httpd.apache.org; Tue, 10 Nov 2009 22:06:54 -0800 (PST) Date: Tue, 10 Nov 2009 22:06:28 -0800 From: Basant Kukreja Subject: Re: Httpd 3.0 or something else In-reply-to: Sender: Basant.Kukreja@Sun.COM To: dev@httpd.apache.org Message-id: <20091111060628.GA5450@lmonica2.home> References: <6cca3db30911101056h5c5e154ag9a1f7a6891e6c81c@mail.gmail.com> User-Agent: Mutt/1.5.19 (2009-01-05) X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Nov 10, 2009 at 05:30:34PM -0500, Akins, Brian wrote: > On 11/10/09 1:56 PM, "Greg Stein" wrote: > > > > But some buckets might be performing gzip or SSL encryption. That > > consumes CPU within the network thread. > > You could just run x times CPU cores number of "network" threads. You can't > use more than 100% of a CPU anyway. > > The model that some of us discussed -- Greg, you may have invented it ;) -- > was to have a small pool of acceptor threads (maybe just one) and a pool of > "worker" threads. The acceptor threads accept connections and move them into > worker threads - that's it. A single fd is then entirely owned by that > worker thread until it (the fd) goes away - network/disk io, gzip, ssl, etc. Sun Web Server (originated from Netscape) (Also Open Web Server) currently handle this way. It has a pool of acceptor threads which accepts connections, acceptor threads pushes the connection to a connection queue, worker threads pulls connection from connection queue and serves the request. Keep alive daemon is also multi-threaded. So multiple keep alive threads polls for the various sets of connection for future HTTP requests. The above architecture is highly scalable. Recently Sun published a specweb record using this Web Server for 128 CMT threads (32 cores system). http://www.spec.org/web2005/results/res2009q4/web2005-20091013-00143.txt You can see the sources from Open Web Server code if you are interested. http://wikis.sun.com/display/wsFOSS/Open+Web+Server Regards, Basant.