Skip to content

Commit

Permalink
bbr-doc: update quick-start guide: no need for fq qdisc in Linux v4.13
Browse files Browse the repository at this point in the history
  • Loading branch information
nealcardwell committed Jul 20, 2017
1 parent 092664e commit d871b1c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 22 deletions.
34 changes: 13 additions & 21 deletions Documentation/bbr-quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ typeset -x ZONE="us-west1-a" # A GCE Zone
```

Next, we can create a VM to build the kernel with BBR. This will create a
high-cpu instance with SSD disks to compile our kernel:
Google Cloud instance to compile our kernel:

```
gcloud compute \
Expand Down Expand Up @@ -63,8 +63,13 @@ sudo apt-get upgrade

## Obtain kernel sources with TCP BBR

Since BBR was only recently contributed to Linux, we'll need to compile a
development kernel that includes this feature.
TCP BBR is in Linux v4.9 and beyond. However, we recommend compiling from the
latest sources, from the networking development branch. In particular, in the
`davem/net-next` networking development branch (and Linux v4.13-rc1 and
beyond) there is new support for
[TCP-level pacing](https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=218af599fa635b107cfe10acf3249c4dfe5e4123).
This means that there is no longer a requirement to install the "fq" qdisc to
use BBR. Any qdisc will do.

For this guide, we'll grab the Linux networking development branch
`davem/net-next` from `git.kernel.org`.
Expand Down Expand Up @@ -115,16 +120,6 @@ make -j`nproc`
make -j`nproc` modules
```

## Configure the machine

On your GCE instance, configure the system, changing the default qdisc to fq,
and default TCP congestion control to BBR:

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

## Install the kernel and reboot

On your GCE instance, install the newly-compiled kernel and reboot:
Expand All @@ -150,32 +145,29 @@ build timestamp matching the kernel you compiled above:
Linux bbrtest1 4.8.0-rc7+ #1 SMP Thu Sep 29 20:06:31 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
```

Finally, on your GCE instance, confirm that the fq qdisc is installed and that
BBR is being used:
Finally, on your GCE instance, confirm that BBR is being used:

```
tc qdisc show
sysctl net.ipv4.tcp_congestion_control
```

Enjoy!

## Further reading

If you already have a kernel config for GCE, then you can enable BBR and
FQ. On your GCE instance, check that if you run:
If you already have a kernel config for GCE, then you can just enable BBR,
rebuild, and reboot. On your GCE instance, check that if you run:

```
cd /usr/src/net-next
egrep '(CONFIG_TCP_CONG_BBR|CONFIG_NET_SCH_FQ)=' .config
egrep '(_BBR)' .config
```

then you see exactly the following lines:

```
CONFIG_TCP_CONG_BBR=y
CONFIG_NET_SCH_FQ=y
CONFIG_DEFAULT_BBR=y
```

If you want to create your own .config, then just remember to include those two
Expand Down
2 changes: 1 addition & 1 deletion Documentation/config.gce
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ CONFIG_TCP_CONG_CUBIC=y
# CONFIG_TCP_CONG_DCTCP is not set
# CONFIG_TCP_CONG_CDG is not set
CONFIG_TCP_CONG_BBR=y
CONFIG_DEFAULT_CUBIC=y
CONFIG_DEFAULT_BBR=y
# CONFIG_DEFAULT_RENO is not set
CONFIG_DEFAULT_TCP_CONG="cubic"
CONFIG_TCP_MD5SIG=y
Expand Down

0 comments on commit d871b1c

Please sign in to comment.