Testing Throughput Using TCP or UDP
Differences Explained
|
TCP |
UDP |
|
TCP stack adapts to available bandwidth. |
UDP sends packets on best effort – sender is « bit blaster ». |
|
TCP stack implementation and configuration has important impact. |
UDP stack is minimal (packets building). |
|
TCP traffic is bidirectional : one way sends traffic, other way acknowledges. |
UDP is unidirectional – no acknowledgments from receiver. |
|
High sensitivity to packet losses and network delay: Delay will impact acknowledgement speed – loss result in retransmissions resulting in exponential throughput degradation. |
Not sensitive to network delay. Loss packets will result in linear degradation of throughput. |
|
TCP is throughput QoE: that is what user experience. |
UDP is throughput QoS : this is what network can deliver. |
When to Use TCP
- Qualifying user experience.
- Validate available traffic on a network with live network active – no risk of congestion as TCP traffic will auto adapt to available bandwidth.
- Compare against typical FTP based measurements or Speedtest behaviors.
- Qualify impact of TCP stack configuration (window size, buffers, Operating system etc.
When to Use UDP
- Qualifying available bandwidth : stress line with datagrams traffic (RFC 2544).
- Validate transport in both directions at same time.
- Validate unused line – UDP traffic can cause network congestions affecting real users traffic.
Combination of TCP and UDP
A test called COS qualification offers pairs with TCP and pairs with UDP (RTP) and is designed to test different classes of services :
- data class of services are tested with TCP.
- voice/real traffic class of service is tested with RTP/UDP.