DEV Community

HUO HUO
HUO HUO

Posted on • Originally published at gsvps.com

How to Enable and Verify TCP BBR on Linux

BBR is a TCP congestion-control algorithm that estimates bandwidth and round-trip time. It can improve throughput on long-distance or high-latency TCP connections, but it is not a universal speed boost. If the bottleneck is CPU, storage, a bandwidth cap, a poor route, or UDP traffic, BBR may make little difference.

Check support first

uname -r
sysctl net.ipv4.tcp_available_congestion_control
sysctl net.ipv4.tcp_congestion_control
sysctl net.core.default_qdisc
Enter fullscreen mode Exit fullscreen mode

Linux 4.9 or newer is generally required. Continue only if the available algorithms include bbr. If BBR is missing, editing sysctl configuration will not help; upgrade to a supported kernel first.

Enable BBR safely

Back up the configuration and check for conflicting entries:

sudo cp /etc/sysctl.conf /etc/sysctl.conf.bak
grep -nE 'net.core.default_qdisc|net.ipv4.tcp_congestion_control' /etc/sysctl.conf
Enter fullscreen mode Exit fullscreen mode

If the keys are absent, add:

net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
Enter fullscreen mode Exit fullscreen mode

Then load the configuration:

sudo sysctl -p
Enter fullscreen mode Exit fullscreen mode

Modern Ubuntu, Debian, CentOS Stream, Rocky Linux, and AlmaLinux installations usually need no extra steps when the running kernel supports BBR. CentOS 7 often has an older default kernel, so check the actual kernel.

Verify the active setting

sysctl net.ipv4.tcp_congestion_control
sysctl net.core.default_qdisc
lsmod | grep bbr
Enter fullscreen mode Exit fullscreen mode

The important result is net.ipv4.tcp_congestion_control = bbr. Some systems may not show an obvious lsmod entry even when BBR is active.

Measure instead of guessing

Compare before and after results using the same destination, file size, time window, and route. Look at sustained throughput, rsync or SCP stability, retransmissions, and performance over high-latency links. A single page refresh is not a useful benchmark.

If sysctl -p reports an invalid argument, recheck the available algorithms and look for duplicate settings in /etc/sysctl.conf and /etc/sysctl.d/. If the value changes after reboot, another sysctl file, cloud-init, a control panel, or an optimization script may be overriding it.

Roll back

sudo cp /etc/sysctl.conf.bak /etc/sysctl.conf
sudo sysctl -p
Enter fullscreen mode Exit fullscreen mode

The practical rule: verify kernel support, back up the configuration, enable BBR, confirm the active value, and measure under repeatable conditions.

The original GSVPS guide includes distro-specific commands and a status-check script.

Top comments (1)

Collapse
 
topstar_ai profile image
Luis

๐Ÿง  What BBR is (quickly)

TCP BBR is a congestion control algorithm designed to improve throughput and reduce latency by estimating bandwidth + RTT instead of reacting only to packet loss.

It works best on modern Linux kernels (typically 4.9+, ideally newer).

โš™๏ธ 1. Check if BBR is available

Run:

sysctl net.ipv4.tcp_available_congestion_control

If you see:

reno cubic bbr

๐Ÿ‘‰ BBR is already supported.

๐Ÿ“ฆ 2. Load BBR module (if needed)

Check module:

lsmod | grep bbr

If empty, load it:

sudo modprobe tcp_bbr

To persist after reboot:

echo "tcp_bbr" | sudo tee /etc/modules-load.d/bbr.conf
๐Ÿš€ 3. Enable BBR (system-wide)

Edit sysctl config:

sudo nano /etc/sysctl.conf

Add:

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

Apply immediately:

sudo sysctl -p
๐Ÿ” 4. Verify BBR is active

Run:

sysctl net.ipv4.tcp_congestion_control

Expected output:

net.ipv4.tcp_congestion_control = bbr

Also verify queue discipline:

sysctl net.core.default_qdisc

Expected:

fq
๐Ÿงช 5. Optional live confirmation
ss -tin

Look for bbr in congestion control details.

๐Ÿงฉ Key takeaway
BBR must be supported by kernel
Must be enabled via sysctl
Works best with fq qdisc
Verification is always done via sysctl