How to change TCP "time wait" delay in Windows 7 / 2008 Server?

18,682

Perhaps you could try creating a new DWORD value (at the path you've mentioned already) and see if it works?

Share:
18,682

Related videos on Youtube

darkAsPitch
Author by

darkAsPitch

Updated on September 18, 2022

Comments

  • darkAsPitch
    darkAsPitch over 1 year

    Windows Server 2003 "offers two methods of controlling TIME-WAIT behavior."

    1. The TcpTimedWaitDelay registry value under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters key can be used to alter the default setting. Windows Server 2003 TCP/IP allows this value to be set as low as 30 seconds, which should not cause problems in most environments, or as high as 300 seconds.

    2. The number of user-accessible ephemeral ports that can be used as sources for outbound connections can be configured using the MaxUserPorts registry value, also found under the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters key. By default, when an application requests any socket from the system to use for an outbound call, a port numbered between 1024 and 5000 is supplied. MaxUserPorts can be used to set the value of the uppermost port that the administrator chooses to allow for outbound connections. For instance, setting this value to 10,000 (decimal) makes approximately 9000 user ports available for outbound connections. For more details on this concept, see RFC 793: Transmission Control Protocol DARPA Internet Program Protocol Specification.

    If you could do that in windows server 2003, surely you can accomplish that in windows 7 enterprise? (Or even 2008 server).

    The only problem is, I can't seem to find anything about changing the time wait variable on either OS on the internet.

    Can one of your super users help me out?!

    • surfasb
      surfasb almost 13 years
      I have no idea why you would want to change this in the first place??
    • darkAsPitch
      darkAsPitch almost 13 years
      I want to try it because an application I am using takes up what seem to be 5,000 maximum connections rather quickly with 80-90% of them sitting as "time_wait" connections (doing nothing, just waiting to close).
    • surfasb
      surfasb almost 13 years
      Good ol Bittorrents. You know the maximum number of connections is somthing like 60K.
    • darkAsPitch
      darkAsPitch almost 13 years
      Nope, not bittorrents ;) And I can see in cports (nirsoft.net/utils/cports.html) that only 5,000 tcp connections are ever created. It is when the number of tcp connections reaches ~5,000 that everything grinds to a halt (and 90% of the tcp connections are in time_wait state, so I want to know how to alter that value).
  • darkAsPitch
    darkAsPitch almost 13 years
    Tried that. Actually tcp optimizer (speedguide.net/downloads.php) did so for me but I have not noticed a difference (even setting it to "10").