4.13 Optimizing Data Transfer over WAN Connections

You can optimize data transfer performance and fine tune it for WAN connections. You do this by modifying configuration parameters that the system reads from settings you make in a configuration tool residing on your PlateSpin Server host. For the generic procedure, see PlateSpin Configuration.

4.13.1 Tuning Parameters

Use the file transfer configuration parameters settings to optimize data transfers across a WAN. These settings are global and affect all replications using the file-based and VSS replications.

NOTE:If these values are modified, replication times on high-speed networks, such as Gigabit Ethernet, might be negatively impacted. Before modifying any of these parameters, consider consulting PlateSpin Support first.

Table 4-4 lists the configuration parameters on the PlateSpin Configuration page (https://Your_PlateSpin_Server/platespinconfiguration/) that control file transfer speeds with the defaults and maximum values. You can modify these values through trial-and-error testing in order to optimize operation in a high-latency WAN environment.

Table 4-4 Default and Optimized File Transfer Configuration Parameters

Parameter

Default Value

Maximum Value

AlwaysUseNonVSSFileTransferForWindows2003

False

 

FileTransferCompressionThreadsCount

Controls the number of threads used for packet-level data compression. This setting is ignored if compression is disabled. Because the compression is CPU-bound, this setting might have a performance impact.

2

N/A

FileTransferBufferThresholdPercentage

Determines the minimum amount of data that must be buffered before creating and sending new network packets.

10

 

FileTransferKeepAliveTimeOutMilliSec

Specifies ow long to wait to start sending keep alive messages if TCP times out.

120000

 

FileTransferLongerThan24HoursSupport

True

 

FileTransferLowMemoryThresholdInBytes

Determines when the server considers itself to be in a low memory state, which causes augmentation of some networking behavior.

536870912

 

FileTransferMaxBufferSizeForLowMemoryInBytes

Specifies the internal buffer size used in a low memory state.

5242880

 

FileTransferMaxBufferSizeInBytes

Specifies internal buffer size for holding packet data.

31457280

 

FileTransferMaxPacketSizeInBytes

Determines the largest packets that will be sent.

1048576

 

FileTransferMinCompressionLimit

Specifies the packet-level compression threshold in bytes.

0 (disabled)

max 65536 (64 KB)

FileTransferPort

3725

 

FileTransferSendReceiveBufferSize

Defines the maximum size (in bytes) of the send and receive buffers for TCP connections in the replication network. The buffer size affects the TCP Receive Window (RWIN) size, which sets the number of bytes that can be sent without TCP acknowledgement. This setting is relevant for both file-based and block-based transfers. Tuning the buffer size based on your network bandwidth and latency improves throughput and reduces CPU processing.

When the value is set to zero (off), the default TCP window size is used (8 KB). For custom sizes, specify the size in bytes.

Use the following formula to determine the proper value:

((LINK_SPEED in Mbps / 8) * DELAY in sec)) * 1000 * 1024

For example, for a 100 Mbps link with 10 ms latency, the proper buffer size would be:

(100/8)* 0.01 * 1000 * 1024 = 128000 bytes

For tuning information, see Tuning FileTransferSendReceiveBufferSize.

0 (8192 bytes)

max 5242880 (5 MB)

FileTransferSendReceiveBufferSizeLinux

Specifies the TCP/IP Receive Window (RWIN) Size setting for file transfer connections for Linux. It controls the number of bytes sent without TCP acknowledgement, in bytes.

When the value is set to zero (off), the TCP/IP window size value for Linux is automatically calculated from the FileTransferSendReceiveBufferSize setting. If both parameters are set to zero (off), the default value is 248 KB. For custom sizes, specify the size in bytes.

NOTE:In previous release versions, you were required to set this parameter to 1/2 the desired value, but this is no longer required.

0 (253952 bytes)

 

FileTransferShutDownTimeOutInMinutes

1090

 

FileTransferTCPTimeOutMilliSec

Sets both the TCP Send and TCP Receive Timeout values.

30000

 

PostFileTransferActionsRequiredTimeInMinutes

60

 

4.13.2 Tuning FileTransferSendReceiveBufferSize

The FileTransferSendReceiveBufferSize parameter defines the maximum size (in bytes) of the send and receive buffers for TCP connections in the replication network. The buffer size affects the TCP Receive Window (RWIN) size, which sets the number of bytes that can be sent without TCP acknowledgement. This setting is relevant for both file-based and block-based transfers. Tuning the buffer size based on your network bandwidth and latency improves throughput and reduces CPU processing.

You can tune the FileTransferSendReceiveBufferSize parameter to optimize transfer of blocks or files from the source servers to the target servers in your replication environment. Set the parameter on the PlateSpin Configuration page (https://Your_PlateSpin_Server/platespinconfiguration/).

To calculate the optimum buffer size:

  1. Determine the latency (delay) between the source server and target server.

    The goal is to discover what the latency is for a packet size that approaches the MTU as closely as possible.

    1. Log in to the source server as an Administrator user.

    2. Enter the following at a command prompt:

      # ping <target-server-ip-address> -f -l <MTU_minus_28> -n 10

      Typically, the -l option for ping adds 28 bytes in headers of the specified payload for the target-server-ip-address. Thus, a size in bytes of MTU minus 28 is a good initial value to try.

    3. Iteratively modify the payload and re-enter the command in Step 1.b until you get the following message:

      The packet needs to be fragmented.

    4. Note the latency in seconds.

      For example, if the latency is 35 ms (milliseconds), then note 0.035 as the latency. 

  2. Calculate a byte value for your initial buffer size:

    Buffer Size = (Bandwidth in Mbps / 8) * Latency in seconds * 1000 * 1024

    Use binary values for the network bandwidth. That is, 10 Gbps = 10240 Mbps and 1 Gbps = 1024 Mbps.

    For example, the calculation for a 10 Gbps network with a latency of 35 ms is:

    Buffer Size = (10240 / 8) * 0.035 * 1000 * 1024 = 45875200 bytes
  3. (Optional) Calculate an optimal buffer size by rounding up to a multiple of the Maximum Segment Size (MSS).

    1. Determine the MSS:

      MSS = MTU Size in bytes - (IP Header Size + TCP Header Size) 

      The IP header size is 20 bytes. The TCP header size is 20 bytes plus the bytes for options like timestamp.

      For example, if your MTU size is 1470, then your MSS is typically 1430.

      MSS = 1470 bytes - (20 bytes + 20 bytes) = 1430 bytes
    2. Calculate the optimal buffer size:

      Optimal Buffer Size = (roundup( Buffer Size / MSS )) * MSS

      To continue the example:

      Optimal Buffer Size = (roundup(45875200 / 1430)) * 1430
                          = 32081 * 1430 
                          = 45875830

      You round up instead of down, because rounding down gives a multiple of the MSS that is smaller than the Buffer Size of 45875200:

      Non-optimal Buffer Size = 32080 * 1430 = 45874400