UDT拥塞控制算法协议及源码分析

UDT的拥塞控制是一个开放框架,允许用户自定义算法并轻松切换。当接收到ACK或NAK时,控制算法会调整参数,如增加拥塞窗口大小。文章详细分析了UDT的CCC接口以及onACK和onLoss的源代码实现。
摘要由CSDN通过智能技术生成

此节对应与UDT协议文本的第七节。

Configurable Congestion Control (CCC) 

The congestion control in UDT is an open framework so that userdefined control algorithm can be easily implemented and switched. Particularly, the native control algorithm is also implemented by this framework. The user-defined algorithm may redefine several control routines to read and adjust several UDT parameters. The routines will becalled when certain event occurs. For example, when an ACK is received, the control algorithm may increase the congestion window size. 

可配置的拥塞控制

UDT中的拥塞控制是一个开放的框架,以致于用户自定义的拥塞控制算法很容易被实现和切换。特别的是,原生的控制算法也是用这个框架实现的。用户自定义的算法可以重新定义一些控制routines,读取和调整一些UDT参数。当相关事件发生的时候,routines将会被调用。例如,当收到一个ACK的时候,拥塞控制算法会增长拥塞窗口。

CCC Interface 
UDT allow users to access two congestion control parameters:the congestion window size and the inter-packet sending interval. Users may adjust these two parameters to realize window-based control, rate-based control, or a hybrid approach. In addition, the following parameters should also be exposed. 

1) RTT 
2) Maximum Segment/Packet Size 
3) Estimated Bandwidth 
4) The latest packet sequence number that has been sent so far 
5) Packet arriving rate at the receiver side 

A UDT implementation may expose additional parameters as well. This information can be used in user-defined congestion control algorithms to adjust the packet sending rate. 

The following control events can be redefined via CCC (e.g.,by a callback function). 
1) init: when the UDT socket is connected. 
2) close: when the UDT socket is closed. 
3) onACK: when ACK is received. 
4) onLOSS: when NAK is received. 
5) onTimeout: when timeout occurs. 
6) onPktSent: when a data packet is sent. 
7) onPktRecv: when a data packet is received.

Users can also adjust the following parameters in the user-defined control algorithms. 
1) ACK interval: An ACK may be sent every fixed number of packets. User may define this interval. If this value is -1, then it means no ACK will be sent based on packet interval. 
2) ACK Timer: An ACK will also be sent every fixed time interval. This is mandatory in UDT. The maximum and default ACK time interval is SYN. 
3) RTO: UDT uses 4 * RTT + RTTVar to compute RTO. Users may redefine this. Detailed description and discussion of UDT/CCC can be found in [GG05]. 

CCC接口

UDT允许用户访问两个拥塞控制参数:拥塞窗口大小和包与包之间的发送间隔。用户可以调整这两个参数来实现基于窗口的控制算法、基于速率的控制算法或者是一套混合的控制算法。初次之外,以下参数也是用户可见的。
1)RTT
2)最大报文段/包大小
3)估计带宽
4)最近发送的最大报文序列号
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值