Saturday, September 2, 2017

Activate TCP BBR on Linode VPS

Linux kernel 4.9+ required to support "tcp_bbr"

If your kernel doesn't support  "tcp_bbr", update it.

1. Download the latest Linux kernel, for example:
`wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.10.17/
linux-image-4.10.17-041017-generic_4.10.17-041017.201705201051_amd64.deb`

2. Install the kernel:
`dpkg -i linux-image-4.*.deb`

3. Delete old kernel:
`dpkg -l | grep linux-image `
`apt-get purge (old kernel)`

4. Update grub & reboot
`update-grub`
`reboot`

5. Edit Configuration Profile --> Kernel --> GRUB 2 in Linode Manager Console, then reboot



Turn on BBR

1. execute command `uname -r` to see if the kernel version >= 4.9

2. execute command `lsmod | grep bbr`,if there is no `tcp_bbr` in the result, execute the following commands first:

`modprobe tcp_bbr`
`echo "tcp_bbr" >> /etc/modules-load.d/modules.conf` 

3. Execute:

`echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf`
`echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf`
 
4. Save:

`sysctl -p`

5. Execute:

`sysctl net.ipv4.tcp_available_congestion_control`
`sysctl net.ipv4.tcp_congestion_control`

If there is `tcp_bbr` in the result, it means that your kernel has turned BBR on. The BBR has been activated when you see the `tcp_bbr`.

@reference_1_github.com
开启TCP BBR拥塞控制算法
@reference_2_orchidflower.oschina.io
在Linode节点上开启BBR算法

update:
http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.5/linux-image-
4.13.5-041305-generic_4.13.5-041305.201710050600_amd64.deb

No comments:

Post a Comment