Rat's

Debian 9/10快速开启Google BBR的方法,实现高效单边加速
说明:Google BBR刚出来的时候,一键包都还没出来,都是手动把内核换到4.9以上,从而开启BBR加速,方法可...
扫描右侧二维码阅读全文
16
2017/09

Debian 9/10快速开启Google BBR的方法,实现高效单边加速

说明:Google BBR刚出来的时候,一键包都还没出来,都是手动把内核换到4.9以上,从而开启BBR加速,方法可参考:使用Google BBR拥塞算法加速TCP教程,由于 Debian 9默认的就是4.9的内核而且编译了TCP BBR的内容,所以可以直接通过参数开启。

提示:目前最新版Debian 10内核为4.19,也可以直接用该方法开启BBR。

方法

1、修改系统变量

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

2、保存生效

sysctl -p

3、查看内核是否已开启BBR

sysctl net.ipv4.tcp_available_congestion_control

显示以下即已开启:

# sysctl net.ipv4.tcp_available_congestion_control
net.ipv4.tcp_available_congestion_control = bbr cubic reno

4、查看BBR是否启动

lsmod | grep bbr

显示以下即启动成功:

# lsmod | grep bbr
tcp_bbr                20480  14
Vultr新用户注册送100美元/16个机房按小时计费,支持支付宝,【点击查看】。
最后修改:2019 年 01 月 22 日 12 : 44 AM

发表评论

15 条评论

  1. jackiey

    你好我的 这个命令bbr显示在最后面 是不是要调整下bbr的顺序额 # sysctl net.ipv4.tcp_available_congestion_control
    net.ipv4.tcp_available_congestion_control = reno cubic bbr

    1. Rat's
      @jackiey

      顺序好像没啥影响

  2. 苏苏

    这是开启了ipv4,那ipv6怎么开启呢?找了好久没找到办法

    1. uniartisan
      @苏苏

      Yes, both sysctl (net.ipv4.tcp_allowed_congestion_control and net.ipv4.tcp_available_congestion_control) and /proc entry (/proc/sys/net/ipv4/tcp_congestion_control) apply to every IPv4 and IPv6 TCP connections. The ipv4 part in the sysctl and /proc names does not mean that this is only for TCP over ipv4. This only means that the algorithm is implemented in the linux/net/ipv4 subdirectory of the kernel source tree: in Linux, TCP over IPv6 implements the congestion control by making calls to the implementation for IPv4, since there is no difference between TCP congestion control in TCP over IPv4 and TCP over IPv6.

      这是在海外网站看到的

  3. 奕奕

    机器猫真乃神器,好多次遇到问题都是在机器猫这里解决的

    1. Rat's
      @奕奕

      瞎水而已,说不定真能帮助到人

      1. LYM
        @Rat's

        真的帮了咱好多qwq

  4. loren

    有没有启动TCP FAST OPEN的简单方式?

    1. Rat's
      @loren

      这个不是一条命令的事吗echo "net.ipv4.tcp_fastopen=3" >> /etc/sysctl.conf && sysctl -p

      1. loren
        @Rat's

        哈哈,我也发现了,多谢!

  5. 十三姨爱我

    阔以阔以哈哈!另外,头像我很喜欢!!!

  6. LY

    最后显示的20480 0不是14算成功了吗

    1. Rat's
      @LY

      有返回值就成功了。

  7. icelee

    感谢楼主,这个方法果然有效,提升速度是大大滴!
    要是歌曲再多一些周董的就好啦~

    1. Rat's
      @icelee

      歌曲可以考虑。