Enabling and Validating TCP BBR on Linux: A Practical Guide
Learn how to activate the BBR congestion‑control algorithm on a Linux host, verify its operation, and benchmark its impact on throughput and latency. The guide covers prerequisites, configuration steps, testing with iperf3, and rollback to a loss‑based algorithm.
28 May 2026, 03:55 UTC

Desired Outcome
\nThe goal is to enable TCP BBR (Bottleneck Bandwidth and RTT) on a running Linux system, confirm that new TCP connections use BBR, and demonstrate measurable throughput improvements over a loss‑based algorithm such as Cubic. The guide also provides a quick rollback path if BBR introduces instability.
\nPrerequisites
\n- \n
- Linux kernel 4.9 or newer. BBR is included as a built‑in module in most distributions from this version onward. \n
- Root or sudo privileges to modify kernel parameters and load modules. \n
- Network connectivity to a test server that can run
iperf3or a similar traffic generator. \n - Optional: Disable TCP segmentation offload (TSO) or generic segmentation offload (GSO) on the NIC if you want the most accurate measurement of BBR behavior. On many modern NICs this is not required, but some environments report higher variability with TSO enabled. \n
Step 1 – Verify Current Congestion Control
\nBefore making changes, check which algorithm is currently active:
\n# sudo sysctl net.ipv4.tcp_congestion_control\nnet.ipv4.tcp_congestion_control = cubic\n\nReplace cubic with whatever algorithm your system reports.
Step 2 – Load the BBR Module (If Needed)
\nOn most distributions, the BBR module is built into the kernel and automatically loaded when the algorithm is selected. If you see an error when attempting to enable BBR, load the module manually:
\n# sudo modprobe tcp_bbr\n# lsmod | grep tcp_bbr\n\nSuccessful output will include a line for tcp_bbr indicating the module is loaded.
Step 3 – Enable BBR via sysctl
\nActivate BBR for new TCP connections:
\n# sudo sysctl -w net.ipv4.tcp_congestion_control=bbr\nnet.ipv4.tcp_congestion_control = bbr\n\nTo make the change persistent across reboots, create or edit a sysctl drop‑in file:
\n# sudo tee /etc/sysctl.d/99-bbr.conf > /dev/null <<'EOF'\nnet.ipv4.tcp_congestion_control = bbr\nEOF\n# sudo sysctl --system\n\nAfter this, any new outbound TCP connection will use BBR.
\nStep 4 – Validate BBR is in Use
\nRun the following command to confirm the active algorithm:
\n# sysctl net.ipv4.tcp_congestion_control\nnet.ipv4.tcp_congestion_control = bbr\n\nFor a more granular check, inspect the netstat or ss output for a specific connection:
# ss -i -p | grep ESTAB | head\nESTAB 0 0 192.168.1.10:54321 203.0.113.5:80 users:((\"curl\",pid=1234,fd=4)) \n\nWhile ss does not directly expose the congestion controller, you can confirm that the connection is active after enabling BBR and that no error codes appear.
Step 5 – Benchmark with iperf3
\nUse iperf3 to generate a sustained TCP stream and measure bandwidth and latency. Run a server on the remote host:
# iperf3 -s\n\nThen on the client, perform a baseline test with Cubic (or the previous algorithm) and record the results:
\n# sudo sysctl -w net.ipv4.tcp_congestion_control=cubic\n# iperf3 -c -t 30 -i 5\n\nNote the throughput (MB/s) and average RTT values reported. Repeat the test after enabling BBR:
\n# sudo sysctl -w net.ipv4.tcp_congestion_control=bbr\n# iperf3 -c -t 30 -i 5\n\nTypical observations on a high‑bandwidth, high‑latency link are:
\n- \n
- Throughput increases by 10–30% compared to Cubic. \n
- Average RTT stabilizes and is often lower, especially when the link has a large bandwidth‑delay product. \n
- Packet loss remains comparable or lower, as BBR reduces queue buildup. \n
For a more controlled comparison, capture traffic with tcpdump or wireshark and analyze the pacing behavior, but this is optional for most operational scenarios.
Step 6 – Optional TSO/GSO Disable
\nIf you observe irregular performance or suspect NIC offload features are skewing measurements, you can disable TSO/GSO on the interface:
\n# sudo ethtool -K eth0 tso off gso off gro off\n# sudo ethtool -K eth0 tso on gso on gro on # to re‑enable\n\nRun the iperf3 test again to see if throughput or latency improves. Remember to revert these settings on production systems if they affect application traffic.
\nRollback – Revert to Cubic
\nIf BBR causes instability or you need to return to a loss‑based algorithm, simply change the sysctl again:
\n# sudo sysctl -w net.ipv4.tcp_congestion_control=cubic\n# sudo sysctl --system # reload persistent settings\n\nNo service restart is required; the change applies to new connections immediately.
\nLimitations and Caveats
\n- \n
- BBR performs best on paths with low packet loss (<2%). On very lossy links, it may underperform compared to Cubic. \n
- In mixed‑algorithm environments, BBR may consume a larger share of the bottleneck, potentially starving loss‑based peers. \n
- Middleboxes that drop or reorder packets based on ECN or explicit congestion notifications can confuse BBR’s bandwidth estimation. \n
- Older kernels (<4.9) do not include BBR; attempting to load the module will fail. \n
- Some NIC drivers interact poorly with BBR; disabling TSO/GSO can mitigate this but may reduce performance on high‑speed links. \n
Practical Checklist
\n| Task | Command | Verification |
|---|---|---|
| Check kernel version | uname -r | ≥ 4.9 |
| Verify current congestion control | sysctl net.ipv4.tcp_congestion_control | Displays current algorithm |
| Load BBR module | modprobe tcp_bbr | lsmod | grep tcp_bbr shows module |
| Enable BBR | sysctl -w net.ipv4.tcp_congestion_control=bbr | Re‑run sysctl to confirm |
| Persist BBR | Create /etc/sysctl.d/99-bbr.conf | Reload with sysctl --system |
| Benchmark | iperf3 -c <server> -t 30 | Record throughput/RTT |
| Rollback | sysctl -w net.ipv4.tcp_congestion_control=cubic | New connections use Cubic |
Following this procedure gives you a clear, repeatable path to enable BBR, verify its operation, and assess its impact on your network traffic. When deploying in production, monitor for any changes in application latency or packet loss before and after the switch.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.