• okass2 在版块 VPS业务 中发起了话题 Ubuntu 如何开启bbr加速算法 3周, 4天前

    前提条件
    内核版本:BBR 需要 Linux 内核 4.9 或更高。Oracle Cloud 的默认镜像(如 Oracle Linux 8、Ubuntu 20.04/22.04)通常已满足要求。
    权限:需要 root 权限。
    模块支持:内核需编译 CONFIG_TCP_CONG_BBR 和 CONFIG_NET_SCH_FQ。

     

    1.查看当前拥塞控制:
    sysctl net.ipv4.tcp_congestion_control
     

    默认可能是 cubic。

    2.验证加载:
    lsmod | grep -E ‘tcp_bbr|sch_fq’
     

    3.持久化配置:
    vim /etc/sysctl.d/10-bbr.conf

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

    4.应用
    sysctl -p /etc/sysctl.d/10-bbr.conf
     

    5.确保开机加载模块
    vim /etc/modules
    tcp_bbr
    sch_fq
     

    reboot重启

    6.验证是否加载bbr模块并生效
    sysctl net.ipv4.tcp_congestion_control

    输出应为:net.ipv4.tcp_congestion_control = bbr

    检查队列调度器
    sysctl net.core.default_qdisc
    输出应为: net.core.default_qdisc = fq

    查看可用算法
    sysctl net.ipv4.tcp_available_congestion_control
    输出应该包含bbr
    7. 服务器端开启iperf3
    apt update && apt install -y iperf3

    开启iperf
    iperf3 -s
    客户端iperf3测速
    iperf3 -c <VPS_IP> -t 30 -i 2
    8.对比前后吞吐量的变化

     

WirelessLink
Logo