1. Reference links
- official website
/
- Dr. Valley's brief introduction to UDT
/doc/
- Get UDT source code
/projects/udt/files/udt/4.11/.4./download?use_mirror=pilotfiber
- UDT Discussion Post
/p/udt/discussion/
- KCP project, the author mentions a comparison test on KCP/TCP/UDT
/skywind3000/kcp/wiki/KCP-Benchmark
2. Introduction to UDT
2.1 What is UDT
-
UDT(UDP-based Data Transfer Protocol)
A network protocol for high-performance data transmission for applications requiring high bandwidth and low latency -
Originally designed to overcome the shortcomings of TCP in high latency and high packet loss network environments
2.2 Why UDT is needed
(1) Let's first look at the flaws of TCP
- TCP ensures data reliability but performs poorly in high bandwidth/high latency environments
- Low bandwidth utilization:
- TCP's slow start mechanism: causes TCP's transmission bandwidth to increase gradually, resulting in low bandwidth utilization in the initial phase of a TCP connection
- When the network rtt is very large: TCP's slow startup process will be very time consuming and it will take longer to reach TCP's peak bandwidth.
- TCP's congestion control mechanism: when a packet loss occurs, the congestion window decreases dramatically, and the actual bandwidth utilized may be much lower than the actual bandwidth available, resulting in idle bandwidth; and after that, it will enter the slow-start phase again, and will not be able to efficiently utilize the bandwidth.
- Poor performance against high bandwidth latency products
- Typical satellite networks, such as Musk's Starchain program abroad and Chifan's Starchain program at home.
- Satellite links are characterized by higher latency and higher packet loss rates
- The actual test of a product of China Weitong, rtt is basically between 500~600ms, the test packet loss rate can even reach 50%, in such a network environment, TCP slow startup phase consumes a long time, after the loss of packets, slow recovery, congestion window adjustment lag... etc., resulting in TCP is almost unusable!
(2) Looking again at the flaws of UDP
- There's nothing to say. Of course there's no connection. It's unreliable.
(3) Therefore, a new transport protocol is needed that can guarantee data reliability and also fully utilize the network bandwidth for fast recovery in case of congestion or packet loss
(4) Of course there are other programs that can fulfill the above requirements, such as Google's quic, Great God Lin's KCP... etc. The reason why we come to study UDT first is that the audio and video transmission field widely used in theSRT
protocol, which is based on UDT, and our project is again deeply using theSRT
protocol, let's lay the groundwork for studying the SRT protocol later.
3. Source code compilation
-
Get the source code, the latest is
4.11
releases/projects/udt/files/udt/4.11/.4./download?use_mirror=pilotfiber
-
Complete build of the source code, inclusions and sample programs in Ubuntu
$ make -e
-
Build the sample program separately
udt4$ cd app && make