From owner-cvs-src@FreeBSD.ORG Wed Sep 6 14:48:43 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 90A0A16A519 for ; Wed, 6 Sep 2006 14:48:43 +0000 (UTC) (envelope-from silby@silby.com) Received: from relay00.pair.com (relay00.pair.com [209.68.5.9]) by mx1.FreeBSD.org (Postfix) with SMTP id 6995F43D53 for ; Wed, 6 Sep 2006 14:48:42 +0000 (GMT) (envelope-from silby@silby.com) Received: (qmail 55115 invoked from network); 6 Sep 2006 14:48:41 -0000 Received: from unknown (HELO localhost) (unknown) by unknown with SMTP; 6 Sep 2006 14:48:41 -0000 X-pair-Authenticated: 209.68.2.70 Date: Wed, 6 Sep 2006 09:49:15 -0500 (CDT) From: Mike Silbersack To: Gleb Smirnoff In-Reply-To: <20060906143204.GQ40020@FreeBSD.org> Message-ID: <20060906093553.L6691@odysseus.silby.com> References: <200609061356.k86DuZ0w016069@repoman.freebsd.org> <20060906091204.B6691@odysseus.silby.com> <20060906143204.GQ40020@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet in_pcb.c tcp_subr.c tcp_timer.c tcp_var.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2006 14:48:43 -0000 On Wed, 6 Sep 2006, Gleb Smirnoff wrote: > Then we found the CPU hog in the in_pcblookup_local(). I've added > counters and gathered stats via ktr(4). When a lag occured, the > following data was gathered: > > 112350 return 0x0, iterations 0, expired 0 > 112349 return 0xc5154888, iterations 19998, expired 745 Ah, I think I see what's happening. It's probably spinning because the heuristic isn't triggering on each entry, that doesn't surprise me. What does surprise me is that it's expiring more than one entry - my original intent with that code was for it to free just one entry, which it would then use... meaning that I goofed up the implementation. I had been thinking of rewriting that heuristic anyway, I'm sure that I can go back and find something far more efficient if you give me a few days. (Or a week.) > 1.78 hasn't yet been merged to RELENG_6, and we faced the problem on > RELENG_6 boxes where the periodic merging cycle is present. So the > problem is not in 1.78 of tcp_timer.c. We have a lot of tcptw entries > because we have a very big connection rate, not because they are > leaked or not purged. Ok, just checking. With this code removed, are you not seeing the web frontends delaying new connections when they can't find a free port to use? Mike "Silby" Silbersack