Easily Boost Ubuntu Network Performance by Enabling TCP BBR

This tutorial shows you how to enable TCP BBR on Ubuntu. TCP BBR is a TCP congestion control algorithm developed by Google. It tackles shortcomings of traditional TCP congestion control algorithms (Reno or CUBIC). According to Google, it can achieve orders of magnitude higher bandwidth and lower latency. TCP BBR is already being used on Google.com, YouTube and Google Cloud Platform and the Internet Engineering Task Force (IETF) has been standardizing this algorithm Since July, 2017. BBR stands for Bottleneck Bandwidth and RTT.

BBR requires only changes on the sender side. You can enable TCP BBR on your Linux desktop to improve overall web surfing experience. If you have a Linux web server, TCP BBR can achieve faster web page downloads for your website visitors.

Step 1: Check TCP Congestion Control Algorithms on Linux

By default, Linux uses the Reno and CUBIC congestion control algorithm. To check available congestion control algorithms, run the following command.

sysctl net.ipv4.tcp_available_congestion_control

Output:

net.ipv4.tcp_available_congestion_control = cubic reno

To check the current congestion control algorithm in use, run

sysctl net.ipv4.tcp_congestion_control

Output:

net.ipv4.tcp_congestion_control = cubic

Step 2: Enable TCP BBR in Ubuntu

Once you have kernel 4.9 or above, edit sysctl.conf file.

sudo nano /etc/sysctl.conf

Add the following two lines at the end of the file.

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

Save and close the file. Then reload sysctl configurations.

sudo sysctl -p

If you have correctly added the above two lines in the file, then they will be included in the output like below.

linuxbabe@ubuntu:~$ sudo sysctl -p
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr

Now check the congestion control algorithm in use.

sysctl net.ipv4.tcp_congestion_control

Output:

net.ipv4.tcp_congestion_control = bbr

Congrats! You have successfully enabled TCP BBR on Ubuntu.

Leave a Reply