静看光阴荏苒
不管不顾不问不说也不念

编译Google TCP BBR v3

前段时间Google发布了BBR的v3版本,想尝鲜的朋友可以试试~ 我在这里记录下安装步骤供参考。

系统我使用的是Debian12,首先安装编译所需的依赖包和一些常用的软件包:

apt -y update
apt -y install build-essential libncurses-dev libssl-dev libelf-dev bison bc flex rsync debhelper dwarves git

获取源码:

git clone -b v3 https://github.com/google/bbr.git
cd bbr/

复制系统默认的内核配置文件:

cp /boot/config-$(uname -r) .config

执行如下命令保留旧.config文件中的所有选项,并将新选项设置为推荐(即默认)值:

make olddefconfig

打开配置菜单:

make menuconfig

依次进入Networking support->Networking options->TCP: advanced congestion control->,把BBR TCP选项设置为编译成模块:

为节约编译时间和减少硬盘占用,建议关闭DEBUG功能,依次进入Kernel hacking->Compile-time checks and compiler options->Debug information (Disable debug information)->,按下图所示设置为Disable debug information:

编译并创建deb软件包:

make bindeb-pkg -j$(nproc)

编译完成后在上级目录安装新的内核并重启:

cd ..
apt install ./linux-image-6.4.0+_6.4.0-g6e321d1c986a-1_amd64.deb
apt install ./linux-headers-6.4.0+_6.4.0-g6e321d1c986a-1_amd64.deb
systemctl reboot

查看tcp_bbr模块信息:

modinfo tcp_bbr

可以看到版本是3:

启用BBRv3:

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

执行下面的命令检查BBR模块是否启动成功:

lsmod

如有类似回显说明正常:

赞(7)
未经允许不得转载:荒岛 » 编译Google TCP BBR v3
分享到: 更多 (0)

评论 12

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    666,效果咋样?

    BobMaster8个月前 (08-20) Google Chrome 116.0.0.0 Google Chrome 116.0.0.0 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 没有具体测试过。。

      LALA8个月前 (08-23) Google Chrome 116.0.0.0 Google Chrome 116.0.0.0 Windows 10 x64 Edition Windows 10 x64 Edition回复
  2. #2

    make: *** No rule to make target ‘olddefconfig’. Stop.

    Ryan8个月前 (08-21) Google Chrome 115.0.0.0 Google Chrome 115.0.0.0 Windows 10 x64 Edition Windows 10 x64 Edition回复
  3. #3

    make olddefconfig执行后跳出错误make: *** No rule to make target ‘olddefconfig’. Stop.

    Ryan8个月前 (08-21) Google Chrome 115.0.0.0 Google Chrome 115.0.0.0 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 试试:
      cd bbr/
      make distclean
      cp config.gce .config
      make olddefconfig
      make menuconfig

      LALA8个月前 (08-23) Google Chrome 116.0.0.0 Google Chrome 116.0.0.0 Windows 10 x64 Edition Windows 10 x64 Edition回复
  4. #4

    编译时报错:No rule to make target ‘debian/certs/debian-uefi-certs.pem’,解决办法:https://www.youtube.com/watch?v=7G3UkugVhOw

    句句子8个月前 (08-21) Firefox 121.0 Firefox 121.0 Windows NT x64 Edition Windows NT x64 Edition回复
    • debian12的原版内核.config里面默认没有启用这个功能了,你应该用的是debian11吧。

      LALA8个月前 (08-23) Google Chrome 116.0.0.0 Google Chrome 116.0.0.0 Windows 10 x64 Edition Windows 10 x64 Edition回复
      • 对,11

        句句子8个月前 (08-30) Firefox 121.0 Firefox 121.0 Windows NT x64 Edition Windows NT x64 Edition回复
  5. #5

    源自带内核升级都会挂掉的人,不敢玩内核 :cry:

    欧文斯8个月前 (08-21) Google Chrome 106.0.0.0 Google Chrome 106.0.0.0 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 有vnc不怕,挂了在grub选择旧的内核引导就行,或者服务器有快照功能打个快照即可~

      LALA8个月前 (08-23) Google Chrome 116.0.0.0 Google Chrome 116.0.0.0 Windows 10 x64 Edition Windows 10 x64 Edition回复
  6. #6

    出现的报错
    1.’debian/certs/debian-uefi-certs.pem’
    编辑源码目录的 .config 文件
    CONFIG_SYSTEM_TRUSTED_KEYS=”debian/certs/debian-uefi-certs.pem”# 找到
    CONFIG_SYSTEM_TRUSTED_KEYS=”” # 改为空值
    2.lz4编译时有个报错是需要安装这个包
    apt install lz4
    成品 我是用 debian10 先安装了cloud内核,在进行编译的时候,复制了cloud内核的配置文件,按理说这也应该算是
    cloud BBR V3 内核吧😂

    编译好的敢用的拿去,后果自负哈

    https://mega.nz/folder/AIllHDpZ#JnVNSQ2-_wbwpHLJxN8VxQ

    星际难民8个月前 (09-13) Google Chrome 102.0.0.0 Google Chrome 102.0.0.0 Windows 10 x64 Edition Windows 10 x64 Edition回复

分享创造快乐

广告合作资源投稿