This topic describes how to tune Windows operating systems to optimize the performance of Web Servers.
*** TcpTimedWaitDelay
Description: 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.
How to view or set:
1. Use the regedit command, access the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\TCPIP\Parameters registry subkey, and create a new REG_DWORD value named TcpTimedWaitDelay.
2. Set the value to decimal 30, which is Hex 0×0000001e. This value sets the wait time to 30 seconds.
3. Stop and restart the system.
Default value: 0xF0, which sets the wait time to 240 seconds (4 minutes).
Recommended value: A minimum value of 0×1E, which sets the wait time to 30 seconds.
*** MaxUserPort
Description: Determines the highest port number that TCP/IP can assign when an application requests an available user port from the system.
How to view or set:
1. Use the regedit command, access the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Services\TCPIP\Parameters registry subkey, and create a new REG_DWORD value named MaxUserPort.
2. Set this value to at least decimal 32768.
3. Stop and restart the system.
Default value: None
Recommended value: At least decimal 32768.
*** MaxConnect Backlog
Description: If many connection attempts are received simultaneously, increase the default number of pending connections that are supported by the operating system.
How to view or set:
1. Use the regedit command and access the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters registry subkey
2. Create and set (and create if necessary) the following values:
3. “EnableDynamicBacklog”=dword:00000001
4. “MinimumDynamicBacklog”=dword:00000020
5. “MaximumDynamicBacklog”=dword:00001000
6. “DynamicBacklogGrowthDelta”=dword: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.
7. Stop and restart the system.
*** KeepAliveInterval
Description: Determines how often TCP repeats keep-alive transmissions when no response is received.
How to view or set:
1. Use the regedit command, access the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters registry subkey, and create a new REG_DWORD value named KeepAliveInterval.
2. Set this value to 1 second.
3. Stop and restart the system.
Default value: 1 second
Recommended value: None
*** TcpMaxDataRetranmission
Description: Determines how many times TCP retransmits an unacknowledged data segment on an existing connection.
How to view or set:
1. Use the regedit command, access the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters registry subkey, and edit or create a new REG_DWORD value named TcpMaxDataretranmissions.
2. Set this value to 5 seconds
3. Stop and restart the system.
Default value: 5 second
Recommended value: None
*** 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. Complete the following steps to immediately acknowledge incoming TCP segments on a server that runs a Microsoft Windows 2000 operating system:
1. Start the Registry Editor (regedit.exe).
2. Locate and click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\
3. On the Edit menu, click Add Value, and create the following registry value:
4. Value name: TcpDelAckTicks
5. Data type: REG_DWORD
6. Value data: 0
7. Quit Registry Editor.
8. Restart your Windows operating system.
Similarly, to immediately acknowledge incoming TCP segments on a server that runs a Microsoft Windows XP or Windows
Server 2003 operating system:
9. Start the Registry Editor (regedit.exe).
10.Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\
11. On the Edit menu, click New > DWORD Value.
12. Name the new value, TcpAckFrequency, and assign it a value of 1.
13. Close the Registry Editor.
14. Restart your Windows operating system.