Tuning Windows to Allow More Socket Connections when testing with IBM Rational Performance Tester
This Technote explains how to tune Microsoft Windows to allow more simultaneous socket connections to be allocated to an application such as IBM Rational Performance Tester (RPT).
The RPT application will require and consume socket connections, in order to properly simulate a multi-user load on a target server application. However, when the available socket connections from the operating system have been exhausted, the test will likely experience failure.
Two TCP/IP service parameters need to be adjusted:
- The time that must elapse before TCP can reuse the resources for a closed socket connection.
- The highest port number TCP can assign for temporary connections.
The default for the maximum port number to be assigned for temporary socket connections is 5000. The default for the time to elapse for a closed connection before reuse is 240 seconds.
Resolving the problem
Both TCP/IP service parameters must be configured in the Windows Registry. Both parameters must have Values added to the registry since Windows does not add either of these parameters by default. And, both are expected to be found in the same registry subkey.
To configure these TCP/IP parameters:
- Open the Windows program regedt32 and go to subkey: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip\Parameters.
- Create a new REG_DWORD value named TcpTimedWaitDelay and set it to
0x1E(30 seconds), as an example, to effect a quick turn around time for socket reuse (the minimum is 30 seconds).
- Create a new REG_DWORD value named MaxUserPort and set it to
0x8000 (32768), as an example, so TCP will have a much larger range of port numbers to assign for temporary socket connections (the maximum is 65534).
As a reference for information regarding these two TCP/IP Windows registry values, go to the Microsoft Developer Network and search on each Value, TcpTimedWaitDelay and MaxUserPort.
This solution contains information about modifying the system registry. Before making any modifications to the Microsoft Registry Editor, it is strongly recommended that you make a backup of the existing registry. For more information describing how to back up the registry, refer to Microsoft Knowledge Base article 256986