From owner-freebsd-net@FreeBSD.ORG Tue Oct 12 04:28:27 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C16816A4CE for ; Tue, 12 Oct 2004 04:28:27 +0000 (GMT) Received: from mx1.nersc.gov (mx1.nersc.gov [128.55.6.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5271943D53 for ; Tue, 12 Oct 2004 04:28:27 +0000 (GMT) (envelope-from dart@nersc.gov) Received: by mx1.nersc.gov (Postfix, from userid 4002) id 19D0E1F387; Mon, 11 Oct 2004 21:28:27 -0700 (PDT) Received: from mx1.nersc.gov (localhost [127.0.0.1]) by localhost.nersc.gov (Postfix) with ESMTP id 3C63D1F391 for ; Mon, 11 Oct 2004 21:28:20 -0700 (PDT) Received: from gemini.nersc.gov (gemini.nersc.gov [128.55.16.111]) by mx1.nersc.gov (Postfix) with ESMTP id 093B31F387 for ; Mon, 11 Oct 2004 21:28:20 -0700 (PDT) Received: from gemini.nersc.gov (localhost [127.0.0.1]) by gemini.nersc.gov (Postfix) with ESMTP id E21C0F987 for ; Mon, 11 Oct 2004 21:28:19 -0700 (PDT) X-Mailer: exmh version 2.6.3 04/04/2003 with nmh-1.0.4 To: freebsd-net@freebsd.org In-Reply-To: Message from Mike Silbersack <20041011203609.N77693@odysseus.silby.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_-653316872P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Mon, 11 Oct 2004 21:28:19 -0700 From: Eli Dart Message-Id: <20041012042819.E21C0F987@gemini.nersc.gov> X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on mx1.nersc.gov Subject: Re: time X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Oct 2004 04:28:27 -0000 --==_Exmh_-653316872P Content-Type: text/plain; charset=us-ascii In reply to Mike Silbersack : > > On Mon, 11 Oct 2004, Eli Dart wrote: > > > > >> Is there a way to change the time_wait timeout value in FreeBSD? > > > > sysctl -w net.inet.tcp.msl= > > > > The default is 30000 (30 seconds). > > > > --eli > > That may have other sideeffects, however. True enough. I don't think I've ever set it below 10000. > > In FreeBSD 5.x, the TIME_WAIT timeout is not configurable, but time_wait > sockets are stored in a seperate hash table. Also, they are now > terminated prematurely when there is a shortage of ephemeral ports. As a > result, time_wait sockets are no longer the problem they were in certain > situations under 4.x. Most excellent! There is one instance where this could be problematic, though. In the case where a network service needs to be restarted and cannot (for whatever reason) be restarted without closing and then re-opening its listening socket, if there is a socket in TIME_WAIT state the new service instance cannot bind to its port until the sockets from the previous instance have timed out. This doesn't happen all the time, and I've not got an example in front of me just now (so I may be munging details) but this is one of the reasons I typically drop the MSL down from its default. I got bit by this about 6 months ago, and the combination of dropping the MSL and a short sleep in the restart script fixed the problem... Of course, if the enhancements that come with 5.x have addressed this, then so much the better....(I could also be ignorant of an obvious fix, even under 4.x). --eli > > Mike "Silby" Silbersack > --==_Exmh_-653316872P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) Comment: Exmh version 2.5 07/13/2001 iD8DBQFBa11jLTFEeF+CsrMRAnstAJ43LoOii68kfoSCNG53raNqVZQTogCbBBNJ gCmqTewwviev90mgthCV5RI= =+EZL -----END PGP SIGNATURE----- --==_Exmh_-653316872P--