Saturday, April 20, 2024

Debian/Ubuntu开启TCP BBR拥塞控制算法

BBR目的是要尽量跑满带宽,并且尽量不要有排队的情况,效果并不比锐速差。

Linux kernel 4.9.x开始支持tcp_bbr,下面简单讲述如何在Debian 9/Ubuntu 18.04 64bit系统中升级kernel开启TCP BBR拥塞控制算法。

查看当前系统内核:

uname -a

开启BBR

echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf

保存生效

sysctl -p

执行下面的命令,如果结果中有bbr, 则证明你的内核已开启BBR。

sysctl net.ipv4.tcp_available_congestion_control

执行下面的命令,看到有 tcp_bbr 模块即说明BBR已启动。

lsmod | grep bbr

参考资料:
https://github.com/google/bbr
https://patchwork.ozlabs.org/patch/672072/
http://blog.csdn.net/dog250/article/details/52830576

One comment

  1. 非常感谢,步骤很详细。

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.