Skip to content

Instantly share code, notes, and snippets.

@iguoli
Last active June 30, 2021 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iguoli/2f39995ab6f30875c37afc3e02132c44 to your computer and use it in GitHub Desktop.
Save iguoli/2f39995ab6f30875c37afc3e02132c44 to your computer and use it in GitHub Desktop.
开启BBR加速

Ubuntu下开启BBR

1. Linux内核需要更新到4.9以后的版本,使用uname -r查看系统内核版本

  • sudo apt install linux-image-<tab>安装最新的内核映像
  • update-grup上一步会自动执行此命令,因此此命令可以不用手动运行
  • reboot
  • sudo apt purge linux-image-<tab>删除掉旧内核映像

2. 修改内核参数,开启BBR

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

3. 检查内核是否开启BBR

  • sysctl net.ipv4.tcp_available_congestion_control
  • sysctl net.ipv4.tcp_congestion_control

输出结果应包含bbr,同时使用命令lsmod | grep bbr查看tcp_bbr模块是否已加载

@boilfish
Copy link

systcl -> sysctl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment