Google has introduced a TCP Congestion Control Algorithm (CCA) called TCP Bottleneck Bandwidth and RTT (BBR), which addresses many of the limitations found in the traditional Reno and CUBIC algorithms (the default CCAs in Linux). BBR not only improves bandwidth but also reduces latency. This advanced algorithm is already implemented on Google’s servers, and now you can enable it on your Linux machine if it’s running kernel version 4.9 or newer.

By default, Linux uses Reno and CUBIC. You can verify this by running the command:

sysctl net.ipv4.tcp_available_congestion_control

This should display something like:

net.ipv4.tcp_available_congestion_control = cubic reno

To switch to BBR, follow these steps.

What You’ll Need

First, confirm that your Linux machine is using a supported kernel version. Run the following command:

uname -r

If the kernel version is earlier than 4.9, you’ll need to upgrade. For example, Ubuntu 16.04 ships with kernel version 4.4 by default. To update your kernel on Ubuntu 16.04, open a terminal and run these two commands:

sudo apt update
sudo apt install --install-recommends linux-generic-hwe-16.04

After the update completes, reboot your system. Once rebooted, log in again and check the kernel version using the uname -r command. You should now see a kernel version of at least 4.13.

Enabling BBR

Once your system is running a compatible kernel, setting BBR as the default congestion control algorithm is straightforward. Open the sysctl configuration file by running:

sudo nano /etc/sysctl.conf

Then, add these two lines at the bottom of the file:

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

Save the file and exit. Next, reload sysctl with the following command:

sudo sysctl -p

To verify that BBR is now active, run:

sysctl net.ipv4.tcp_congestion_control

You should see bbr listed in the output.

By ops

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *