> ## Content Index
> Fetch the complete content index at: https://yonglun.me/llms.txt
> Use this file to discover other available public pages before exploring further.

# Ubuntu 18.04上开启 BBR
- URL: https://yonglun.me/ubuntu-18-04-bbr/
- Published: 2020-03-06T10:14:14.000Z
- Updated: 2025-04-22T09:07:41.000Z
- Author: Yonglun
- Tags: Open Source, #lang-zh

BBR是Google提出的一种拥塞控制算法。具体的论文见[链接](https://research.google/pubs/pub45646/?ref=yonglun.me)

使用 BBR 的好处包括：

- 降低延迟。适合慢速接入网络。
- 在有一定丢包率的网络环境下，充分利用链路上的带宽。提升高延迟，高带宽的网络链路的性能。

Linux内核从4.9开始已经支持该算法。 下面说明下在Ubuntu 18.04 开启 BBR的方法。

# 1\. 修改sysctl.conf文件

```bash
sudo -i
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf

```

# 2\. 生效配置

```bash
sysctl -p

```

# 3\. 确认内核已经开启BBR功能

```bash
sysctl net.ipv4.tcp_available_congestion_control

```

显示结果的样例如下：

```bash
net.ipv4.tcp_available_congestion_control = reno cubic bbr

```

如net.ipv4.tcp\_available\_congestion\_control 拥塞控制算法参数中包含有bbr的话，说明内核已经开启BBR功能

# 4\. 确认BBR已经启动

```bash
lsmod | grep bbr

```

如下显示证明BBR已经启动

```bash
tcp_bbr                20480  42

```

# \---The End ---