ESC

Start typing to search across invoices, services, domains, tickets, and more...

Search... Ctrl+K
Network & IP

How to Enable BBR on Linux: Turn On TCP BBR Congestion Control Manually

5 steps 8 min read 55661 views 96
On this page

BBR is a TCP congestion control algorithm developed by Google that usually improves throughput and stability on long-distance, cross-border or slightly lossy routes. This guide shows how to enable BBR on Linux on KVM VPS and dedicated servers running Debian, Ubuntu, CentOS Stream, Rocky Linux or AlmaLinux. We only use a transparent manual method and do not recommend unknown "one-click scripts".

Some one-click scripts circulating online replace the kernel, change dozens of system parameters or even install unknown binaries, which can leave the server unbootable or insecure. BBR needs just two settings; do it by hand.

Step 1: Check That Your Kernel Supports BBR

BBR requires Linux kernel 4.9 or newer. Check the kernel and OS versions:

uname -r
cat /etc/os-release

Default kernels on Debian 10+, Ubuntu 18.04+ and Rocky/AlmaLinux 8+ already include BBR. CentOS 7 (kernel 3.10) is end-of-life; reinstalling a newer OS from the client area is safer than forcing a kernel upgrade.

Step 2: List Available Congestion Control Algorithms

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

If bbr is not listed, try loading the module manually:

modprobe tcp_bbr
sysctl net.ipv4.tcp_available_congestion_control

Step 3: Enable BBR with sysctl (Persistent)

Put the settings in a dedicated file under /etc/sysctl.d/ so they are easy to manage and roll back. Set default_qdisc to fq and the congestion control to bbr:

echo "net.core.default_qdisc=fq" | tee /etc/sysctl.d/99-bbr.conf
echo "net.ipv4.tcp_congestion_control=bbr" | tee -a /etc/sysctl.d/99-bbr.conf
sysctl --system

The configuration survives reboots, and the commands are identical on Debian/Ubuntu and CentOS/Rocky/AlmaLinux.

Step 4: Verify BBR Is Enabled

sysctl net.ipv4.tcp_congestion_control
sysctl net.core.default_qdisc
lsmod | grep bbr

If the first command prints bbr and the second prints fq, BBR is on. tcp_bbr in lsmod means the module is loaded; if BBR is built into the kernel, lsmod may print nothing, which is fine as long as sysctl reports bbr.

Step 5: Measure the Effect and Roll Back if Needed

Download the same large file or run iperf3 before and after to compare. To return to the default cubic algorithm:

rm -f /etc/sysctl.d/99-bbr.conf
sysctl -w net.ipv4.tcp_congestion_control=cubic
sysctl -w net.core.default_qdisc=fq_codel
BBR mainly optimizes TCP traffic sent by the server (website downloads, video delivery). It has little effect on uploads to the server or on UDP traffic.

FAQ

Can I enable BBR on OpenVZ or LXC containers?

Containers share the host kernel and cannot load modules or change congestion control. KVM VPS and dedicated servers can.

BBR is on but speed did not change.

BBR helps most on high-latency, slightly lossy paths. If the bottleneck is your local connection, the client or a bandwidth cap, gains will be small. Use mtr to check for packet loss.

Should I use BBR Plus or other modified versions?

Unofficial variants require a custom kernel and have no stability guarantee. Use the stock BBR shipped with your distribution in production.

Still stuck? Open a ticket with IMIDC 24/7 technical support and include your uname -r and sysctl output.

Was this answer helpful?

Related Tutorials