From owner-cvs-src@FreeBSD.ORG Thu Aug 2 21:49:37 2007 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC84616A554; Thu, 2 Aug 2007 21:49:37 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from gw.catspoiler.org (adsl-75-1-14-242.dsl.scrm01.sbcglobal.net [75.1.14.242]) by mx1.freebsd.org (Postfix) with ESMTP id 97E8413C45E; Thu, 2 Aug 2007 21:49:37 +0000 (UTC) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id l72LnS1n001478; Thu, 2 Aug 2007 14:49:32 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200708022149.l72LnS1n001478@gw.catspoiler.org> Date: Thu, 2 Aug 2007 14:49:28 -0700 (PDT) From: Don Lewis To: peter@FreeBSD.org In-Reply-To: <200707312211.l6VMBupO010347@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/netinet tcp_subr.c tcp_timer.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: Thu, 02 Aug 2007 21:49:37 -0000 On 31 Jul, Peter Wemm wrote: > peter 2007-07-31 22:11:56 UTC > > FreeBSD src repository > > Modified files: > sys/netinet tcp_subr.c tcp_timer.h > Log: > Change TCPTV_MIN to be independent of HZ. While it was documented to > be in ticks "for algorithm stability" when originally committed, it turns > out that it has a significant impact in timing out connections. When we > changed HZ from 100 to 1000, this had a big effect on reducing the time > before dropping connections. > > To demonstrate, boot with kern.hz=100. ssh to a box on local ethernet > and establish a reliable round-trip-time (ie: type a few commands). > Then unplug the ethernet and press a key. Time how long it takes to > drop the connection. > > The old behavior (with hz=100) caused the connection to typically drop > between 90 and 110 seconds of getting no response. > > Now boot with kern.hz=1000 (default). The same test causes the ssh session > to drop after just 9-10 seconds. This is a big deal on a wifi connection. > > With kern.hz=1000, change sysctl net.inet.tcp.rexmit_min from 3 to 30. > Note how it behaves the same as when HZ was 100. Also, note that when > booting with hz=100, net.inet.tcp.rexmit_min *used* to be 30. I think this explains I was seeing so many dropped connections to my machine that has been having the "nfe0: watchdog timeout (missed Tx interrupts) -- recovering" problem.