TCP connection configuration

TCP connection attributes are configured on a cluster basis to optimize data throughput over network connections. These attributes are set in the sd.xml configuration file, inside any *TRANSPORT_OPT environment variable.

This topic is not applicable to IBM® Spectrum Symphony Developer Edition.

The attributes should be configured for each connection endpoint in the IBM Spectrum Symphony environment; that is, the client, session director, and session manager. Here are the attributes:
Tip: If you want to configure attributes with default values, it is not necessary to add them to the sd.xml file.
TCP_NODELAY
The default value is 1. This attribute may be set to 0 for message aggregation.
TCP_KEEP_ALIVE_TIME
The interval, in seconds, between the last data packet sent and the first keepalive probe. After the connection is marked to need keepalive, this counter is not used any further. The default value is 180 seconds.
TCP_KEEP_ALIVE_COUNT
(7.3.2 Fix)The number of unacknowledged probes to send before considering the connection has disconnected and notifying the IBM Spectrum Symphony process. The default is 1. Valid values are between 1 and 1000. Both TCP_KEEP_ALIVE_COUNT and TCP_KEEP_ALIVE_INTERVAL are optional. If TCP_KEEP_ALIVE_TIME is not set, TCP_KEEP_ALIVE_COUNT and TCP_KEEP_ALIVE_INTERVAL values will be ignored.
TCP_KEEP_ALIVE_INTERVAL
(7.3.2 Fix)The interval, in seconds, between subsequent keepalive probes, regardless of what the connection has exchanged in the meantime. The default is 5 seconds. Valid values are between 1 and 1000 seconds. Both the TCP_KEEP_ALIVE_COUNT and TCP_KEEP_ALIVE_INTERVAL attributes are optional. If TCP_KEEP_ALIVE_TIME is not set, TCP_KEEP_ALIVE_COUNT and TCP_KEEP_ALIVE_INTERVAL values will be ignored.
TCP_SEND_BUFFER_SIZE
The buffer size for sending. The default value is 65535. Any new value that is less than or equal to the default value is ignored.
TCP_RECV_BUFFER_SIZE
The buffer size for receiving. The default value is 65535. Any new value that is less than or equal to the default value is ignored.

Sample configuration in the sd.xml file, with the TCP attributes inside the SDK_TRANSPORT_OPT environment variable:

<ego:EnvironmentVariable name="SDK_TRANSPORT_OPT">TCP_NODELAY=0,TCP_KEEP_ALIVE_TIME=300,,TCP_KEEP_ALIVE_INTERVAL=1,TCP_KEEP_ALIVE_COUNT=5,TCP_SEND_BUFFER_SIZE=65536,TCP_RECV_BUFFER_SIZE=65536</ego:EnvironmentVariable>
         ...
<ego:EnvironmentVariable name="SD_SDK_TRANSPORT_OPT">TCP_NODELAY=0,TCP_KEEP_ALIVE_TIME=300,TCP_KEEP_ALIVE_INTERVAL=1,TCP_KEEP_ALIVE_COUNT=5,TCP_SEND_BUFFER_SIZE=65536,TCP_RECV_BUFFER_SIZE=65536</ego:EnvironmentVariable>
         ...
<ego:EnvironmentVariable name="SSM_SDK_TRANSPORT_OPT">TCP_NODELAY=0,TCP_KEEP_ALIVE_TIME=300,TCP_KEEP_ALIVE_INTERVAL=1,TCP_KEEP_ALIVE_COUNT=5,TCP_SEND_BUFFER_SIZE=65536,TCP_RECV_BUFFER_SIZE=65536</ego:EnvironmentVariable>
         ...

Configuring local connections on clients

There may be situations where global TCP connection attributes are not appropriate for all connection endpoints in the system; for example, remote clients that are geographically distant from the cluster may require more time to send messages over the network. It is possible to override the system-wide attributes on the remote client host by setting environment variables in the OS shell before starting the client process. This method of overriding system-wide attributes can also be applied to remote hosts that are running services.

The environment variables on the client correspond to the four TCP connection attributes described previously:
PLATCOMMDRV_TCP_NODELAY
Overrides the TCP_NODELAY attribute in the sd.xml file.
PLATCOMMDRV_TCP_KEEPALIVE_TIME
Overrides the TCP_KEEP_ALIVE_TIME attribute in the sd.xml file.
PLATCOMMDRV_TCP_KEEP_ALIVE_COUNT
(7.3.2 Fix)Overrides the TCP_KEEP_ALIVE_COUNT attribute in the sd.xml file.
PLATCOMMDRV_TCP_KEEP_ALIVE_INTERVAL
(7.3.2 Fix)Overrides the TCP_KEEP_ALIVE_INTERVAL attribute in the sd.xml file.
PLATCOMMDRV_TCP_SEND_BUFFER_SIZE
Overrides the TCP_SEND_BUFFER_SIZE attribute in the sd.xml file.
PLATCOMMDRV_TCP_RECV_BUFFER_SIZE
Overrides the TCP_RECV_BUFFER_SIZE attribute in the sd.xml file.

Once the environment variables have been created, you can adjust their values to suit the network environment.