Debian 9 开启 BBR

Debian 9 和 10 的内核自带了google 开发的 BBR 拥塞算法,我们可以很方便的开启BBR 进行访问加速

开启方法:

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

如果执行之后没有报错,重启一下系统就可以让配置生效.

重启之后,执行如下命令查看内核是否已开启BBR:

sysctl net.ipv4.tcp_available_congestion_control

显示以下即已开启:

root@localhost:~# sysctl net.ipv4.tcp_available_congestion_control
net.ipv4.tcp_available_congestion_control = bbr cubic reno

查看BBR是否启动:

lsmod | grep bbr

显示以下即启动成功:

root@localhost:~# lsmod | grep bbr
tcp_bbr 16384 14