IBM Netezza Replication Services, Version 1.6

Optimal TCP window size

The TCP window size optimizes the rate at which of data is transferred between replication log server hosts. You should tune the window to an appropriate setting, which depends on network specifics.

To achieve good transfer performance, it is important to set the window size accurately, yet not set it too large, which adversely affects memory utilization for the log server systems. Use the same value on all replication log server hosts that communicate in a replication set.

Replication software in releases earlier than NPS® 7.2 requires a minimum TCP window size of 128,000 bytes. Each RHEL release has a different default window size. For example, RHEL releases earlier than 6.2 have a default window size of 131,071 bytes, which meets the minimum. For RHEL release 6.2, the default size is 124,928 bytes. Check the TCP window size for your RHEL environment. If you are using the default window size and that default window size is below the minimum, you must reset the buffer values, as described in Setting the TCP window size.

You require the following information to determine the optimal settings:
  • The bandwidth of the communication link between replication log server hosts in bits per second
  • The round trip latency between the replication log server hosts (an average ping time)
The following algorithm determines the optimal window size, based on the network delay and the link size:

Optimal size = (size of the link in MB/s) x (round trip delay in seconds)

As an example, consider a scenario of a 1 Gb/s connection between two sites with an average latency of 90 ms. The link bandwidth in megabytes/second would be calculated as (1 x 1024/8) or 128 MB/s. A value of 90 ms is (90/1000) or 0.09 s. The optimal setting in this case is 128 x 0.09, or approximately 11.5 MB.

By default, the PTS (replication log server) software attempts to use a buffer of 16 MB maximum. However, it uses only what is available on the system as configured on the Linux operating system. In some cases, the optimal value is greater than 16 MB (for example, for a network with large bandwidth and high latency), but the default maximum that is used is still 16 MB, regardless of the Linux settings. If necessary, an IBM® Netezza® service representative can customize the default value.



Feedback