Configuring TCP Sockets

When attempting to handle a large number of transactions under a scalable load, you may need to increase the size of the TCP socket pool to avoid running out of TCP sockets. Running out of TCP sockets can be caused by your Windows system not freeing the TCP socket resources quickly enough.

To increase the size of the socket pool by modifying the Windows Registry
  1. Open the Windows Registry.

  2. Open HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP\Parameters, and make the following changes:
    Add this DWORD name
    Set to
    TcpTimedWaitDelay A low value, such as 1 (default: 30 seconds).
    MaxUserPort A high value, such as 32768 (default: 5000).
  3. Open HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Afd\Parameters, and add the DWORD name DisableAddressSharing, set to a low value, such as 1.

Modifying TCP Configurations in Solaris

In a Solaris environment, TCP/IP configuration changes are typically made using the ndd utility. The ndd utility can be used to "get" (display) and "set" (change) the TCP/IP driver configuration values.

To increase the size of the socket pool by modifying TCP/IP configurations in Solaris
  1. Enter the following to view the available set of commands:

    ndd /dev/tcp \?

  2. Make the following modifications:
    tcp_conn_req_max_q A higher value, such as 1024.
    tcp_time_wait_interval A lower value, such as 60000 or lower (default: 240000).
    tcp_fin_wait_2_flush_interval A lower value, such as 67500 or lower (default: 675000).
Related Topics
Bullet Configuring Your Run-time Environment
Bullet Configuring the Runtime Service
Bullet Updating MCS Server Information for Your Runtime Service