TCP - Network Latency and Throughput - Whitepaper
TCP - Network Latency and Throughput - Whitepaper
What the
customer
gets
5M
3M 10M
2M 20M
NETWORK 1M 30M
0 50M
6.63
Megabits
What the
customer
Packet loss expects
and latency
throttles down
throughput
White Paper
One of the key reasons for the switch form UDP to TCP is that content providers want TCP for reliability/
quality of picture etc. Service providers believe that today’s networks are much higher bandwidth and
therefore able to cope with longer delays and re-transmissions. However, throughput can be much less
than the provisioned capacity of the link. The issues affecting TCP throughput are very often out with
the network operator’s control but as these issues are often significant it’s important that each network
operator can be certain that their network is not causing throughput issues thereby reducing time
consuming finger pointing and troubleshooting. Traditional testing is of the RFC-2544 variety i.e. load
testing which does not capture problems associated with latency and buffer size. Studies have shown
that a correctly configured TCP network can perform up to 10 times faster*.
• Routing/Switching Latency: An IP router adds approximately 200us per device. This would add another
1.4ms to the above New York to London link based on assumptions that there is one router per 800km.
• Queuing Latency: This is the amount of time a packet can spend in a queue awaiting transmission due
to congestion after routing/switching. This can add another 20ms of latency.
Network Latency can be such a problem that some satellite links implement TCP spoofing to terminate
the link at the Tx site to pretend that the link has lower delay. This only works if the link is uncongested
and error free.
2 I spirent.com
High Speed Network – Effect of a segment at a time. This is done to detect optimal
throughput. The whole process is very sensitive to
Buffering delay through the network. A simple rule in a zero
TCP performs badly in the presence of latency packet loss environment is that:
and tiny amounts of packet loss. In addition, TCP
TCP Rate = MSS/RTD
windowing and latency can be an even bigger
problem in high speed networks. At 100GbE, the where:
TCP windowing buffer fills up much more quickly MSS = Maximum Segment Size
than at 10GbE or 40GbE as the interface input and RTD = Round Trip Delay
output buffers tend not to be scaled up sufficiently
to cope with higher speed traffic. This means (if you TCP is also bursty in nature and spikes exceeding
set the same wait time) that you get a throughput the CIR (Committed Information Rate) can equate
drop-off at even lower latencies than at 10GbE or to lost packets, leading to re-transmission with a
40GbE. smaller window size and consequently reduced
throughput. There is a double hit here as the “ACK”
Some switches are now combating this issue process leads to more messages going back and
by adding many GBytes worth of packet buffer forth which is the very process that takes longer
memory. This is many orders of magnitude greater when there is more latency in the network.
than the amount of buffering in traditional switch/
routers. This helps minimize packet loss, preventing
re-transmission delays and the build up of huge TCP Slow Start
latencies. 1 Segment
Data Loss
As a result, different switches/routers will perform
markedly differently within a network and there ACK
can be a huge resultant difference to the observed
practical traffic throughput within the network.
2 Segments
TCP Windowing (effect of latency
and packet loss on throughput)
CWND
The figure opposite shows the TCP windowing ACK
‘Slow Start’ in action. It is inefficient to send a single 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
spirent.com I 3
White Paper
4 I spirent.com
How is TCP effected by Packet Loss and Latency?
The graph below provides an indication of the effect of 0% packet loss and no latency on the left with
almost full bandwidth utilization. With 3% packet loss, congestion control & slow start process TCP struggles
to fill the link even with no latency. Adding 30ms latency combined with 3% packet loss further impacts
throughput leading to low link utilization. Adding 256ms latency combined with 3% packet loss completely
kills throughput. Therefore, the effect of packet loss and latency on throughput can be extremely severe.
spirent.com I 5
White Paper
6 I spirent.com
Simulating Latency
In order to know the performance of your TCP network or application/service, it’s important to be able
to simulate the network in your laboratory. Service providers will need to be able to add delay to test the
impact on throughput and will need the ability to error packets and measure the impact on throughput
due to packet loss. It is possible to use drums of fiber to simulate network delay but there are practical
considerations with this approach.
• Drums of fiber are too large: Drums of fiber are very large, heavy and unwieldy. 200km of fiber is needed
for 1ms of delay (5ns/metre). So, to simulate the latency from say Los Angeles to New York which is a
distance of 4,500km then 22.5ms of delay is required. That’s 22.5 drums of 200km fiber.
• Amplifiers are needed: Fiber drums need amplification. Single mode 1310nm fiber has a fiber loss of 0.4
dB per km which equates to 80dB loss for 200km. The specified supported range for a single 100GbE LR4
interface is only 100km. Therefore, optical amplifiers are needed for >100km. Simulating longer links such
as the 4,500km link between LA and New York needs a lot of amplification. That’s a lot more cost and
complexity.
• Lack of control: If a test fails with 200km of fiber (1ms latency) it’s not easy to finely adjust fiber length
to find point of failure. Splicing fiber is one method but that’s a time consuming practice and is a one
time event unless you want to purchase more fiber. Adding additional drums to increase latency is
also problematic. It doesn’t lend itself to automation either. You may want or need to control latency via
software that either adds or decreases the latency in small incremental steps.
spirent.com I 7
White Paper
spirent.com
AMERICAS 1-800-SPIRENT
+1-800-774-7368 | [email protected] © 2016 Spirent. All Rights Reserved.
EUROPE AND THE MIDDLE EAST
All of the company names and/or brand names and/or product names referred to in this document, in particular, the name “Spirent”
+44 (0) 1293 767979 | [email protected] and its logo device, are either registered trademarks or trademarks of Spirent plc and its subsidiaries, pending registration in
ASIA AND THE PACIFIC accordance with relevant national laws. All other registered trademarks or trademarks are the property of their respective owners.
+86-10-8518-2539 | [email protected] The information contained in this document is subject to change without notice and does not represent a commitment on the part
of Spirent. The information in this document is believed to be accurate and reliable; however, Spirent assumes no responsibility or
liability for any errors or inaccuracies that may appear in the document. Rev A. | 05/16