With the new TCP Bottleneck Bandwidth and RRT (BBR) algorithm, Google has finally found a way to overcome many issues that were previously present in both Reno & CUBIC. This updated congestion control algorithm achieves significant bandwidth improvements, lowers latency, and is deployed by Google.com, Google Cloud Platform, Youtube, and others.
In the following tutorial, you will learn to enable TCP BBR on Ubuntu 22.04 LTS Jammy Jellyfish using the command line terminal with some configurations and screenshots.
Table of Contents
Update Ubuntu
Begin updating your Ubuntu to ensure all existing packages are up to date.
sudo apt update && sudo apt upgrade -y
Check Existing Congestion Controls
First, before you begin, it is highly advised to check what existing TCP congestion controls are in place. Typically, Linux uses reno and cubic algorithms.
Run the following command in your terminal to determine what is in use by default. BBR should not be featured since you have not added or enabled it yet unless you have done so previously.
sysctl net.ipv4.tcp_congestion_control
Example output:
As the above output states, cubic is employed on your system, but your output may show different results.
Next, what available TCP congestion control algorithms are available as follows.
sysctl net.ipv4.tcp_available_congestion_control
Example output:
From the output, reno and cubic are available, and once BBR has been added/enabled, this should feature BBR.
Enable TCP BBR Congestion Control
Now that you have checked the basics to confirm what algorithms are available, open your sysctl.conf file.
sudo nano /etc/sysctl.conf
Next, copy and paste the following.
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
Example:
Save the sysctl.conf changes using CTRL+O, then exit CTRL+X.
Reload the configuration file using the following command.
sudo sysctl -p
Example output:
Confirm that BBR is enabled and active as the new TCP congestion control by re-using the following command.
sysctl net.ipv4.tcp_congestion_control
Example output:
Alternatively, use the lsmod | grep BBR command to verify as follows.
lsmod | grep bbr
Example output:
Lastly, re-confirm available TCP congestion controls available using the following command.
sysctl net.ipv4.tcp_congestion_control
Example output:
Congratulations, you have enabled TCP BBR.
Comments and Conclusion
In the small tutorial, you have learned how to enable TCP BBR on Ubuntu 22.04 LTS.
Overall, this should help speed up your system extensively unless other hardware or software factors are at play and achieve better low latency.