tcp_time_wait_interval

Discussion

A TCP connection enters TIME_WAIT as a result of the connection being terminated by one or both sides. If a TCP connection is in TIME_WAIT state and the remote transmits data, the side having the TCP connection in TIME_WAIT state sends a RST to indicate that data was lost. tcp_time_wait_interval is the length of time in milliseconds a TCP connection can remain in the TIME_WAIT state. The parameter is reported and set in milliseconds.

One of the most frequently asked questions about tcp_time_wait_interval is "why is the default setting in Solaris 8 so high?" The answer is: it isn't:

The graceful close algorithm of TCP requires that the connection state remain defined on (at least) on end of the connection, for timeout period of 2xMSL, ie, 4 minutes.

TIME_WAIT represents waiting for enough time to pass to be sure the remote TCP receive the acknowledgement of its connection termination request.

TIME_WAIT state removes the hazard of old duplicates for "fast" or "long" connections, in which clock-driven ISN selection is unable to prevent overlap of the old and new sequence spaces. The TIME_WAIT delay allows all old duplicate segments time enough to die in the Internet before the connection is reopened.

The default in Solaris 8 was 240000 milliseconds, 4 minutes. This value was good for 300 BAUD connections, but may be a bit long for today's networks and applications. The default value in Solaris 9 is 60000 milliseconds, 1 minute. One side effect of using the default value of 4 minutes is that TCp connections can exist in TIME_WAIT state for 4 minutes. It is possible that TCP connections remaining in TIME_WAIT for this period of time can cause excessive resource consumption in the operating system. "Excessive" here means that resources that could have been used for new TCP connections are tied up in TCP connections in the TIME_WAIT state.

External Links

  1. docs.sun.com
  2. RFC 1337: TIME-WAIT Assassination Hazards in TCP
  3. RFC1185: TCP/IP over High Speed Paths

Contributors

UserEditsCommentsLabels
ff1959 604

Labels

networking networking Delete
tcp/ip tcp/ip Delete
solaris solaris Delete
tunables tunables Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact