
Corporate.Net
internetRx
Q:
We have designed some intranet applications in a lab environment and are aware of the bandwidth required for acceptable file-transfer performance. We know that latency in a WAN is a consideration, but how do we calculate the effects of latency on network throughput before we deploy the applications on our intranet?
A:
I will assume that you are using TCP as the transport protocol for your file transfers. In general, the greater the distance the packet has to travel and the more network devices traveled through, the higher the latency.
A reasonable measure of latency involves recording the average round-trip ping time. On a LAN, a typical average round-trip time is 2 milliseconds (ms). On a TCP/IP WAN, a ping from London to Los Angeles will average 350 ms. This may not sound like much, but it is significant to file transfers using TCP. A sending d
evice using TCP requires an acknowledgment from the receiver to indicate that the data sent was received intact. TCP manages this process with a sliding window. Effectively, the window size will define the number of bytes that can be transmitted before an acknowledgment must be received by the intended recipient.
Under optimum conditions, the sending machine's send-window size will vary but remain greater than zero, so that it can continue to send data. In some instances, the sending device transmits the number of bytes equal to the maximum window size before the receiving device transmits its acknowledgment. If this occurs, the sending device will have to stop transmitting and wait for acknowledgment before the transmission can continue. I have known extreme cases in which a corporate client has increased the bandwidth of a WAN link to increase file transfer speed, but the client saw no improvement in performance because of latency.
Let's say that the TCP maximum window size on the sending device is se
t to 8,000 bytes, and we are sending a file from London to Los Angeles over a 192-Kbps fractional
T1 line. Eight-thousand bytes equates to 64,000 bits and on a 192,000-bps line, this takes 64,000/192,000, which is 0.333 of a second or 333 ms. Clearly, if the round-trip ping time is 350 ms, the sending device will wait for 17 ms to receive an acknowledgment from the receiver before it can transmit more data. In this case, increasing the bandwidth (in effect, increasing the rate at which bits are clocked on to the circuit) of the line above 192 Kbps does not speed the file transfer.
To calculate the effects of latency, you need to know line speed, the average round-trip ping time and window sizes of the TCP devices in question. With this data, you can perform the necessary math and determine if the latency of your network will affect performance. This calculation is a slight simplification of what really goes on--we must also consider the maximum segment size of the TCP layer--but it serves as a good rule o
f thumb.
If you need to improve the throughput of a TCP file transfer, you can begin by increasing the Unix machine's window size (communicating devices' windows sizes must match). Alternatively, you can split the single file transfer into multiple streams, letting each stream run up to about 192 Kbps. Reducing the latency of a link is not something you can control. It is defined by the physical path over which the telephone company routes your connection and the equipment it uses to switch your connection. Hardware switching devices, such as ATM switches, have a lower latency than software switching devices like routers.
Chris Lewis is vice president of international operations at ILX Systems in New York. He can be reached at chrisl@ilx.com.
|