Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Oct 2004 21:28:19 -0700
From:      Eli Dart <dart@nersc.gov>
To:        freebsd-net@freebsd.org
Subject:   Re: time 
Message-ID:  <20041012042819.E21C0F987@gemini.nersc.gov>
In-Reply-To: Message from Mike Silbersack <silby@silby.com>  <20041011203609.N77693@odysseus.silby.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
--==_Exmh_-653316872P
Content-Type: text/plain; charset=us-ascii


In reply to Mike Silbersack <silby@silby.com> :

> 
> 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=<milliseconds>
> >
> > 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041012042819.E21C0F987>