Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 32451 invoked from network); 24 Nov 2003 13:31:38 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 24 Nov 2003 13:31:38 -0000 Received: (qmail 94736 invoked by uid 500); 24 Nov 2003 13:31:30 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 94621 invoked by uid 500); 24 Nov 2003 13:31:29 -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: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 94608 invoked from network); 24 Nov 2003 13:31:29 -0000 Received: from unknown (HELO web.turner.com) (64.236.240.190) by daedalus.apache.org with SMTP; 24 Nov 2003 13:31:29 -0000 Received: from web.turner.com (338u.turner.com [10.188.51.43]) by web.turner.com (8.12.9/8.12.9) with ESMTP id hAODVUBd017408 for ; Mon, 24 Nov 2003 08:31:30 -0500 (EST) Message-ID: <3FC20831.2000706@web.turner.com> Date: Mon, 24 Nov 2003 08:31:29 -0500 From: Brian Akins User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031105 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Global keepalive count possible? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I have been thinking about this and just wanted to see if it were possible. Say that MaxClients is 1024. Normally, with keepalives turned on, all 1024 of these threads (or proc's) can be busy doing keep alives which means that they could just be sitting around waiting for them to time out. What I'd like to do is something like "GlobalKeepAliveCount 256." This would mean that at most 256 threads would be busy with keep alives at any time. (This idea is borrowed from another web server.) Here's what I was thinking: -Have a global count for keepalives in shared memory (or scoreboard) -After create connection, check this variable, if less than max, then process normally, increment variable, and register a cleanup on connection pool. This cleanup will decrement the variable. Thoughts? -- Brian Akins Senior Systems Engineer CNN Internet Technologies