Create/Edit Windows Registry Keys for TCP/IP Performance Tuning

This topic describes how to tune Windows 2000, Windows XP, and Windows 2003 operating systems for TCP/IP performance. To add a key to the registry, you can either edit it directly as described below or create and execute a .reg file. When you have finished adding or editing these registry keys, you will need to restart the Server. Configure the following settings or variables below according to your specific tuning needs. If necessary, refer to the GlobalSCAPE Knowledge Base article Q10411 - HOWTO: Windows Registry Settings, for the procedure for creating/editing keys and creating a .reg file.

TcpTimedWaitDelay

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.

To activate this feature, create the following key:

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

Value name:  TcpTimedWaitDelay

Value data: 0x0000001e  (Hex 0x0000001e = decimal 30. This value sets the wait time to 30 seconds.)

MaxUserPort

This key determines the highest port number that TCP/IP can assign when an application requests an available user port from the system.

To activate this feature, create the following key:

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

Value name: MaxUserPort

Value data: (minimum) 32768

MaxConnect Backlog

These keys, if many connection attempts are received simultaneously, increase the default number of pending connections that are supported by the operating system.

To activate this feature, create the following 4 keys:

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

Value name:EnableDynamicBacklog

Value data: 00000001

 

Value name:MinimumDynamicBacklog

Value data: 00000020

 

Value name:MaximumDynamicBacklog

Value data: 00001000

 

Value name:DynamicBacklogGrowthDelta

Value data: 00000010

These values request a minimum of 20 and a maximum of 1000 available connections. The number of available connections is increased by 10 each time that there are fewer than the minimum number of available connections.

KeepAliveInterval

This key determines how often TCP repeats keep-alive transmissions when no response is received.

To activate this feature, create the following key:

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

Value name: KeepAliveInterval

Value data: 1 (second)

TcpMaxDataRetranmission

This key determines how many times TCP retransmits an unacknowledged data segment on an existing connection.

To activate this feature, create the following key:

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

Value name: TcpMaxDataRetransmissions

Value data: 5 (seconds)

TPC/IP Acknowledgements

TCP/IP can be the source of some significant remote method delays. You can increase TCP performance by immediately acknowledging incoming TCP segments, in all situations.

To activate this feature, create the following key:

On Microsoft Windows 2000:

Subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{Interface GUID}\

Value name: TcpDelAckTicks

Value data: 0

On Microsoft Windows XP or Windows Server 2003:

Subkey:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{Interface GUID}

Value name: TcpAckFrequency

Value data: 1