TCP Settings for Heavy Load on Windows OS


This topic describes how to tune Windows XP, Windows 2003, and Windows 2008 /2012 R1 & R2 operating systems for TCP/IP performance. “Tuning” involves adding several registry keys. To add a key to the registry, you can either edit it directly as described below. When you have finished adding or editing these registry keys, you must restart the Server.

In all versions of Windows, add the keys described below. Certain keys/values depend on the operating system installed (noted in the Value name column where different).

Subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP\Parameters

Value Name
(DWORD 32-bit)
Value Data
TcpTimedWaitDelay 30 This key determines the time that must elapse before TCP/IP can release a closed connection and reuse its resources. This interval between closure and release is known as the TIME_WAIT state or twice the maximum segment lifetime (2MSL) state. During this time, reopening the connection to the client and server costs less than establishing a new connection. By reducing the value of this entry, TCP/IP can release closed connections faster and provide more resources for new connections. Adjust this parameter if the running application requires rapid release, the creation of new connections, or an adjustment because of a low throughput caused by multiple connections in the TIME_WAIT state.
MaxUserPort 32768 (minimum) This key determines the highest port number that TCP/IP can assign when an application requests an available user port from the system.
TcpMaxDataRetransmissions 5 (seconds) This key determines how many times TCP retransmits an unacknowledged data segment on an existing connection.
TcpNumConnections 16777214 Determines the maximum number of TCP connections that can be open simultaneously. If the value is 0, you cannot open a connection.