0%

linux 开启 bbr

bbr 是 google 推出的 一个 tcp 单边加速算法,在 linux 内核高于 4.9 的版本中有内置

新建 /etc/sysctl.d/custom.conf 并写入以下内容

# BBR
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr

然后 sudo sysctl -p 立即生效,不然的话会需要重启生效。

查看 bbr 是否开启 lsmod | grep bbr 输出内容如下,如果存在 bbr 字眼就是已经开启了

pi@raspberrypi:~ $ lsmod | grep bbr
tcp_bbr                20480  31
pi@raspberrypi:~ $