# 拥塞控制算法

拥塞控制算法是传输协议在发送端使用的机制，通过根据丢包、时延上升或路由器显式标记等拥塞信号调整发送速率，来调节数据传输的快慢，以免压垮网络。当今在用的算法按所观测的信号分为三族：基于丢包的（Reno、CUBIC）、基于时延的（Vegas、LEDBAT、Copa），以及基于模型的（BBR）——后者对路径带宽和时延建立显式模型。<sup>[1](https://www.rfc-editor.org/rfc/rfc5681.html)</sup><sup> • </sup><sup>[2](https://www.rfc-editor.org/rfc/rfc9438.html)</sup><sup> • </sup><sup>[3](https://datatracker.ietf.org/doc/draft-ietf-ccwg-bbr/06/)</sup>

| 关键事实 | 数值 | 来源 |
|---|---|---|
| 首次拥塞崩溃 | 1986年10月；劳伦斯伯克利实验室到加州大学伯克利分校的吞吐量从32 Kbps跌至40 bps | <sup>[4](https://dl.acm.org/doi/10.1145/52324.52356)</sup> |
| 标准化的TCP算法 | 慢启动、拥塞避免、快速重传、快速恢复（RFC 5681，2009） | <sup>[1](https://www.rfc-editor.org/rfc/rfc5681.html)</sup> |
| 速率上限 | 由拥塞窗口（cwnd）与接收窗口（rwnd）中的较小者决定传输 | <sup>[1](https://www.rfc-editor.org/rfc/rfc5681.html)</sup> |
| AIMD策略 | 超时则将cwnd减半；每收到一个ACK则将cwnd增加\( 1/\mathrm{cwnd} \)（常数\( d = 0.5 \)、\( u = 1 \)） | <sup>[4](https://dl.acm.org/doi/10.1145/52324.52356)</sup> |
| CUBIC的减小因子 | \( \beta = 0.7 \)，而Reno为0.5 | <sup>[2](https://www.rfc-editor.org/rfc/rfc9438.html)</sup> |
| 默认部署 | Linux、Windows和Apple协议栈中为CUBIC；google.com和YouTube上为BBRv3 | <sup>[2](https://www.rfc-editor.org/rfc/rfc9438.html)</sup><sup> • </sup><sup>[5](https://www.usenix.org/system/files/atc25-yuan.pdf)</sup> |
| BBR控制参数 | C.pacing_rate、C.send_quantum和C.cwnd，在Startup、Drain、ProbeBW和ProbeRTT之间循环 | <sup>[3](https://datatracker.ietf.org/doc/draft-ietf-ccwg-bbr/06/)</sup> |

## 工作原理

TCP发送方最多只能发送两个窗口中的较小者所允许的数据量：拥塞窗口（cwnd），即发送端对网络承载能力的估计；以及接收方通告的窗口（rwnd），即流量控制上限。因此吞吐量约为\( \min(\mathrm{rwnd}, \mathrm{cwnd}) / \mathrm{RTT} \)。<sup>[1](https://www.rfc-editor.org/rfc/rfc5681.html)</sup><sup> • </sup><sup>[6](https://kernel-internals.org/net/tcp-congestion/)</sup> 这一设计立足于分组守恒：对于处于平衡状态的连接，旧分组离开网络之前不会放入新分组，于是ACK的到达触发新数据的发送（自计时），而超时则意味着丢包和拥塞。<sup>[4](https://dl.acm.org/doi/10.1145/52324.52356)</sup><sup> • </sup><sup>[7](https://tcpcc.systemsapproach.org/algorithm.html)</sup>

经典响应是加性增、乘性减（AIMD）：发生丢包时，将窗口按固定因子减小；每收到一个新数据的ACK，则将cwnd增加\( 1/\mathrm{cwnd} \)（以字节计为\( \mathrm{maxseg} \cdot \mathrm{maxseg}/\mathrm{cwnd} \)），常数\( d = 0.5 \)、\( u = 1 \)；在TCP对重传超时的响应中，ssthresh根据在途数据量的一半设定，且不低于两个报文段，cwnd重置为一个SMSS。<sup>[4](https://dl.acm.org/doi/10.1145/52324.52356)</sup> 丢包是默认的拥塞信号；显式拥塞通知（ECN）是另一种选择——路由器在丢弃之前先在IP首部标记CE码点，接收方再将其回显。<sup>[1](https://www.rfc-editor.org/rfc/rfc5681.html)</sup><sup> • </sup><sup>[6](https://kernel-internals.org/net/tcp-congestion/)</sup> 基于丢包的控制存在可扩展性极限：按Mathis式丢包模型，CUBIC要在100 ms RTT的路径上维持10 Gbps，丢包率须低于0.000003%；该模型在网络边缘能较好地估计NewReno吞吐量，但当数千条流在Gbps级核心带宽上竞争时则不然。<sup>[3](https://datatracker.ietf.org/doc/draft-ietf-ccwg-bbr/06/)</sup><sup> • </sup><sup>[8](https://par.nsf.gov/biblio/10311806-revisiting-tcp-congestion-control-throughput-models-fairness-properties-scale)</sup>

## 实现方式

发送方运行一个状态机。在慢启动中，cwnd呈指数增长：RFC 5681建议每收到一个ACK执行\( \mathrm{cwnd} \mathrel{+}= \min(N, \mathrm{SMSS}) \)，其中N为新确认的字节数。<sup>[1](https://www.rfc-editor.org/rfc/rfc5681.html)</sup> 在拥塞避免中，增长是线性的，大约每RTT一个报文段，每收到一个ACK执行\( \mathrm{cwnd} \mathrel{+}= \mathrm{SMSS} \cdot \mathrm{SMSS}/\mathrm{cwnd} \)。当重传定时器检测到丢包时，ssthresh设为至多\( \max(\mathrm{FlightSize}/2, 2 \cdot \mathrm{SMSS}) \)；快速重传将三个重复ACK视为丢包信号，重传该报文段，并将cwnd设为ssthresh加\( 3 \cdot \mathrm{SMSS} \)，此后由快速恢复掌管新数据的发送，直到收到非重复ACK。<sup>[1](https://www.rfc-editor.org/rfc/rfc5681.html)</sup> CUBIC建议在真正发生丢包之前通过HyStart++（RFC 9406）退出慢启动。<sup>[2](https://www.rfc-editor.org/rfc/rfc9438.html)</sup> QUIC推荐的控制器类似NewReno：发生丢包或ECN-CE计数增加时，慢启动转入恢复，ssthresh设为cwnd的一半，发送方可单方面改用CUBIC等其他算法。<sup>[9](https://datatracker.ietf.org/doc/rfc9002/)</sup>

## 起源

1986年的崩溃使劳伦斯伯克利实验室与加州大学伯克利分校之间的吞吐量从32 Kbps跌至40 bps，促成了[范·雅各布森](https://www.edgepedia.org/zh/van-jacobson)与迈克尔·J·卡雷尔斯的《拥塞避免与控制》，该文于1988年8月1日发表在SIGCOMM '88会议录中（DOI 10.1145/52324.52356）。<sup>[4](https://dl.acm.org/doi/10.1145/52324.52356)</sup> 两人将七种算法引入4BSD TCP：往返时间方差估计、重传定时器的指数退避、慢启动、更积极的接收方ACK策略、拥塞时的动态窗口调整、Karn钳位重传退避，以及快速重传。<sup>[4](https://dl.acm.org/doi/10.1145/52324.52356)</sup> 这些机制在1988年的4.3 BSD Unix Tahoe版本中成为TCP Tahoe，随后[TCP Reno](https://www.edgepedia.org/zh/tcp-reno)于1990年初随4.3BSD-Reno版本问世。<sup>[7](https://tcpcc.systemsapproach.org/algorithm.html)</sup><sup> • </sup><sup>[4](https://dl.acm.org/doi/10.1145/52324.52356)</sup><sup> • </sup><sup>[10](http://root.org/ip-development/email/vanj.88feb11.txt)</sup><sup> • </sup><sup>[1](https://www.rfc-editor.org/rfc/rfc5681.html)</sup> RFC 5681（2009年9月）将上述四种算法标准化。<sup>[1](https://www.rfc-editor.org/rfc/rfc5681.html)</sup>

## 变体

**Reno与NewReno。** Reno实现了上述AIMD基线；[NewReno](https://www.edgepedia.org/zh/newreno)要等到最后一个窗口中的所有报文段都被确认后才退出快速恢复。<sup>[11](https://www.usenix.org/legacy/events/usenix02/tech/freenix/full_papers/sarolahti/sarolahti.pdf)</sup>

**BIC与CUBIC。** BIC对合适的窗口进行二分搜索：丢包后按因子\( \beta \)缩减窗口，然后向旧拥塞值方向探测中点。CUBIC将这种分段线性增长替换为自上次拥塞事件以来时间的[三次函数](https://www.edgepedia.org/zh/cubic-function)，

\[ W_{\mathrm{cubic}}(t) = C \cdot (t - K)^{3} + W_{\max} \]

其中\( K \)是达到\( W_{\max} \)所需的时间，\( C \)通常取0.4，并设\( \beta = 0.7 \)。<sup>[2](https://www.rfc-editor.org/rfc/rfc9438.html)</sup><sup> • </sup><sup>[6](https://kernel-internals.org/net/tcp-congestion/)</sup><sup> • </sup><sup>[7](https://tcpcc.systemsapproach.org/algorithm.html)</sup> 由于增长取决于流逝的时间而非ACK的到达，它与RTT无关，从而在不同RTT之间实现更公平的共享。RFC 9438提及CUBIC；CUBIC论文（SIGOPS Operating Systems Review，2008）记录了其设计及其作为Linux默认算法的角色。<sup>[2](https://www.rfc-editor.org/rfc/rfc9438.html)</sup><sup> • </sup><sup>[12](https://dl.acm.org/doi/10.1145/1400097.1400105)</sup>

**BBR。** BBRv3是IETF CCWG草案中的版本，属于基于模型的算法：它测量交付速率、RTT和丢包率，以估计可用带宽和BDP，并控制pacing_rate、send_quantum和cwnd，而非仅控制cwnd。其状态机在Startup、Drain、ProbeBW和ProbeRTT之间循环，维护10秒内的窗口化最小RTT，并对每个往返周期内2%的丢包率或ECN做出反应。<sup>[3](https://datatracker.ietf.org/doc/draft-ietf-ccwg-bbr/06/)</sup><sup> • </sup><sup>[6](https://kernel-internals.org/net/tcp-congestion/)</sup>

**基于时延的算法。** Vegas、LEDBAT和Copa等基于时延的设计从持续排队时延而非丢包推断拥塞。Copa的目标速率为\( 1/(\delta \cdot d_{\mathrm{q}}) \)，其中\( d_{\mathrm{q}} \)为实测排队时延；当竞争流使队列在\( 5 \cdot \mathrm{RTT} \)内无法排空时，它切换到竞争性的AIMD模式。<sup>[13](https://dspace.mit.edu/bitstream/handle/1721.1/137382/copa.pdf)</sup>

## 应用

CUBIC是Linux（自内核2.6.19起）、Windows和Apple协议栈中的默认TCP算法，也可用于QUIC和SCTP；BBR自Linux内核4.9起进入内核，并部署在Google的B4广域网和YouTube中。<sup>[2](https://www.rfc-editor.org/rfc/rfc9438.html)</sup><sup> • </sup><sup>[6](https://kernel-internals.org/net/tcp-congestion/)</sup><sup> • </sup><sup>[14](https://dl.ifip.org/db/conf/networking/networking2018/2B1-1570416152.pdf)</sup> BBR于2019年演化为BBRv2，2023年演化为BBRv3；BBRv3承载了google.com和YouTube全部公共互联网TCP流量，而Amazon、Akamai、Meta和Cloudflare的CDN使用BBRv1。<sup>[5](https://www.usenix.org/system/files/atc25-yuan.pdf)</sup> QUIC自2021年起成为标准轨RFC，默认搭载类似NewReno的算法，但允许使用任何算法。<sup>[5](https://www.usenix.org/system/files/atc25-yuan.pdf)</sup><sup> • </sup><sup>[9](https://datatracker.ietf.org/doc/rfc9002/)</sup>

实测行为因情形而异。在RTT约252 ms、有丢包的长肥网络中，BBR取得了最高的有效吞吐量（约80 Mbps）。<sup>[15](https://posco.github.io/publication/docs/TCP_Measurement_lin.pdf)</sup> Copa在吞吐量接近CUBIC和BBR水平的同时，排队时延降至其二分之一至十分之一。<sup>[13](https://dspace.mit.edu/bitstream/handle/1721.1/137382/copa.pdf)</sup>

## 局限与替代方案

**基于丢包的失效模式。** 基于丢包的算法将所有丢包都视为拥塞，因此在无线网络中——丢包往往反映传输错误——CUBIC的表现会受损；在2.4 GHz和5 GHz Wi-Fi下，其重传次数和窗口都接近NewReno的两倍，且它可能迅速填满大型尾部丢弃缓冲区，形成持续队列（缓冲区膨胀）。<sup>[2](https://www.rfc-editor.org/rfc/rfc9438.html)</sup><sup> • </sup><sup>[15](https://posco.github.io/publication/docs/TCP_Measurement_lin.pdf)</sup>

**BBR的失效模式。** BBR适合浅缓冲区，但其表现良好的情形往往正是它对竞争流不公平的情形；它通常保持约2倍BDP的在途数据，一个BDP用于容量，一个用于延迟或聚合的ACK。<sup>[16](https://www3.cs.stonybrook.edu/~anshul/imc19_bbr.pdf)</sup> 当CUBIC与BBR共享瓶颈时，CUBIC可将BBR的份额平均压低至8%；而基于时延的流在基于丢包的流填满队列时会退让，吞吐量随之骤降。<sup>[17](https://tma.roc.cnam.fr/Proceedings/TMA_Paper_21.pdf)</sup> 两条RTT分别为40 ms和80 ms的BBR流在120 Mbit/s的Mahimahi瓶颈上分得8.3与107 Mbit/s，BBR偏向高RTT的流。<sup>[18](https://cap.csail.mit.edu/sites/default/files/research-pdfs/Starvation%20in%20End-to-End%20Congestion%20Control.pdf)</sup> 当时延抖动中的非拥塞成分超过其平衡时延范围的两倍时，时延限界算法（Vegas、FAST、BBR、Copa）也可能被饿死。<sup>[18](https://cap.csail.mit.edu/sites/default/files/research-pdfs/Starvation%20in%20End-to-End%20Congestion%20Control.pdf)</sup>

**替代方案。** ECN让路由器在丢弃之前标记拥塞，发送方则减小cwnd并进入CWR；从BBRv2起，BBRv3代码中已支持L4S式ECN（ECT(1)码点）以实现更细粒度的响应，不过L4S尚未进入Linux主线。<sup>[6](https://kernel-internals.org/net/tcp-congestion/)</sup><sup> • </sup><sup>[19](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0330972)</sup>

**近期进展。** BBRv3仍未进入Linux主线内核，部分原因是与CUBIC之间尚存公平性问题，而CUBIC仍是Linux稳定版和[Windows 11](https://www.edgepedia.org/zh/windows-11)的默认算法。<sup>[19](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0330972)</sup> 基于学习的控制器仍未经证实：2025年的一项大规模研究发现，当带宽和时延动态变化时，Orca、Sage和Astraea均逊于CUBIC和BBRv3，尽管它们能抵抗非拥塞性丢包。<sup>[20](https://arxiv.org/abs/2510.25105)</sup>

## References

1. [RFC 5681: TCP Congestion Control](https://www.rfc-editor.org/rfc/rfc5681.html)
2. [RFC 9438: CUBIC for Fast and Long-Distance Networks](https://www.rfc-editor.org/rfc/rfc9438.html)
3. [draft-ietf-ccwg-bbr-06, BBR Congestion Control (IETF Internet-Draft, BBRv3)](https://datatracker.ietf.org/doc/draft-ietf-ccwg-bbr/06/)
4. [Congestion avoidance and control (ACM DL record, SIGCOMM '88)](https://dl.acm.org/doi/10.1145/52324.52356)
5. [Internet Connection Splitting: What's Old is New Again (USENIX ATC 2025)](https://www.usenix.org/system/files/atc25-yuan.pdf)
6. [TCP Congestion Control - Linux Kernel Internals](https://kernel-internals.org/net/tcp-congestion/)
7. [TCP Congestion Control: A Systems Approach, Chapter 4: Control-Based Algorithms](https://tcpcc.systemsapproach.org/algorithm.html)
8. [Revisiting TCP congestion control throughput models & fairness properties at scale (ACM IMC 2021, NSF record)](https://par.nsf.gov/biblio/10311806-revisiting-tcp-congestion-control-throughput-models-fairness-properties-scale)
9. [RFC 9002 - QUIC Loss Detection and Congestion Control](https://datatracker.ietf.org/doc/rfc9002/)
10. [Van Jacobson email, 11 February 1988 (precursor to the SIGCOMM paper)](http://root.org/ip-development/email/vanj.88feb11.txt)
11. [TCP Performance Analysis on Linux (Sarolahti, USENIX ATC 2002 FREENIX Track)](https://www.usenix.org/legacy/events/usenix02/tech/freenix/full_papers/sarolahti/sarolahti.pdf)
12. [CUBIC: a new TCP-friendly high-speed TCP variant (Ha, Rhee, Xu, ACM SIGOPS Operating Systems Review, 2008)](https://dl.acm.org/doi/10.1145/1400097.1400105)
13. [Copa: Practical Delay-Based Congestion Control for the Internet (MIT DSpace)](https://dspace.mit.edu/bitstream/handle/1721.1/137382/copa.pdf)
14. [Towards a Deeper Understanding of TCP BBR Congestion Control (IFIP Networking 2018)](https://dl.ifip.org/db/conf/networking/networking2018/2B1-1570416152.pdf)
15. [Extensive Evaluation on the Performance and Behaviour of TCP Congestion Control Protocols under Varied Network Scenarios](https://posco.github.io/publication/docs/TCP_Measurement_lin.pdf)
16. [When to use and when not to use BBR: An empirical analysis and evaluation study (IMC 2019)](https://www3.cs.stonybrook.edu/~anshul/imc19_bbr.pdf)
17. [Fifty Shades of Congestion Control: A Performance and Interactions Evaluation (TMA)](https://tma.roc.cnam.fr/Proceedings/TMA_Paper_21.pdf)
18. [Starvation in End-to-End Congestion Control (MIT CSAIL, SIGCOMM 2022)](https://cap.csail.mit.edu/sites/default/files/research-pdfs/Starvation%20in%20End-to-End%20Congestion%20Control.pdf)
19. [BBR-n+ congestion control: Real-time performance with smart exit and advanced AQMs (PLOS One)](https://journals.plos.org/plosone/article?id=10.1371%2Fjournal.pone.0330972)
20. [Learning-Based vs Human-Derived Congestion Control: An In-Depth Experimental Study](https://arxiv.org/abs/2510.25105)

---
*Initially written Sep 29, 2026 · Reviewed: Sep 30, 2026 · Edited: Sep 30, 2026 · Last review: Sep 30, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › Networking fundamentals and architecture › Internet protocol suite

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/congestion-control-algorithm

English original: https://www.edgepedia.org/congestion-control-algorithm
