浅淡TCP BBR

背景

在一对跨地域的机器(美国<->香港),使用TCP(Cubic拥塞控制算法)通信throughput最高2MB/s,丢包率0.02%。使用UDP通信throughput最高能达到140MB/s。

这是一个非常典型的长肥管道(LFN),并且丢包率比较高。尝试使用BBR算法后,throughput可达50MB/s+(Windows系统,通信协议使用用户态MsQuic)。

Loss-based Congestion Control Algorithm

Reno和Cubic是比较经典的,用于TCP的拥塞控制算法。这一类算法使用的是基于丢包反馈的思想,即一旦产生了丢包,就认为链路上产生了拥塞。先将拥塞窗口减半,再进入快速恢复模式。

在快速恢复完成后中,就又会重新进入拥塞避免阶段。

TCP-Reno-Cubic

Reno当收到一个ACK包时,会将拥塞窗口增大一个MSS,窗口大小线性增长。而Cubic使用的是一个基于上次拥塞事件产生时间的三次函数,所以拥塞窗口能更快速的恢复到拥塞事件发生之前的大小。

但无论是Reno还是Cubic,在遭遇高丢包率的时候,其拥塞控制窗口的大小会一直处于一个非常小的状态。

在RTT较大时,拥塞窗口的大小增长速度更加缓慢,使得带宽利用率长时间维持在一个较低的状态。

下图为Cubic在有丢包(0.002%, 0.02%, 0 …

more ...

STUP - the Implementation (3)

throughput and window size

The wisdom of STUP protocol is all about the window size. The throughput of a TCP communication is limited by two windows: the congestion window and the receive window. The congestion window can determine how many bytes that can be send a simple piece of time …

more ...

STUP - Packet Structure and State Machine (2)

STUP Packet Structure

Brief Introduction of TCP & UDP Packet Structure

STUP pretend itself as a protocol at the Transmission Layer, but actually it's absolutely an Application Layer protocol. So before we start, I'd like to recall some knowledge of two important Transmission Layer protocol: TCP & UDP.

It is well known …

more ...

STUP - another (stupid) TCP over UDP protocol (1)

What is STUP?

STUP is the abbreviation of "Speeded/Secure Tcp-like Udp Protocol", which means that it's another TCP over UDP protocol.

Why TCP over UDP?

TCP is a network protocol for general purpose, and it's one of the most commonly used internet protocol on this planet. It is reliable …

more ...