BBR is enabled with two sysctl settings — net.core.default_qdisc=fq and net.ipv4.tcp_congestion_control=bbr — on any Linux kernel 4.9 or newer. It replaces the default CUBIC algorithm, which slows down only after it sees packet loss, with a model that estimates the path’s bandwidth and round-trip time and paces packets to fit. On high-latency or lossy paths — a server in Montreal talking to clients across the continent, or a link that drops the occasional packet — BBR often moves noticeably more data. On a clean local network it usually changes nothing. This guide covers checking kernel support, turning BBR on, making it survive a reboot, and measuring the result without fooling yourself.
What you’ll accomplish
- Confirm your kernel ships the
tcp_bbrmodule and thefqqdisc. - Switch the active congestion control algorithm from CUBIC to BBR.
- Persist both settings in
/etc/sysctl.d/so they survive reboots and kernel upgrades. - Verify per-socket that live connections are actually using BBR.
- Run an honest before/after comparison instead of trusting a single number.
Prerequisites
- Kernel 4.9 or newer. BBR (now called BBRv1) was merged into mainline Linux 4.9 in 2016. Every currently supported distribution — Ubuntu 20.04+, Debian 11+, RHEL 8+, and their derivatives — ships it. Check with
uname -r. - A note on versions. BBRv1 is what the mainline kernel gives you and what this guide enables. BBRv2 and BBRv3 exist as Google patch sets and out-of-tree kernel branches, and they address BBRv1’s known unfairness toward loss-based flows, but neither is in the mainline kernel as a drop-in
tcp_congestion_controlvalue at time of writing. If you typebbr2orbbr3and it is not there, that is expected — stick withbbr. - Root or sudo. Every step writes to
/proc/sysor/etc/sysctl.d/. - The right kind of path. BBR helps most when latency is high or the path drops packets. If your traffic never leaves a low-latency, loss-free LAN, expect little or no change — see When this is the wrong approach before you spend time on it.
How it works
CUBIC is loss-based. It grows its sending window until a packet is dropped, treats that drop as the signal that the pipe is full, cuts the window, and grows again. The result is the sawtooth on the left of the diagram: throughput climbs, overfills the router’s buffer, loses a packet, backs off, repeats. On a modern network with deep buffers (“bufferbloat”), CUBIC keeps those buffers full, which adds latency, and on a path that drops packets for reasons other than congestion — wireless, a lossy transit link — it backs off when it did not need to.
BBR is model-based. Instead of waiting for loss, it continuously measures two things: the maximum bandwidth it has recently delivered, and the minimum round-trip time it has recently seen. Their product is the bandwidth-delay product (BDP) — the amount of data the pipe can hold. BBR paces packets to sit right at that estimate, filling the pipe without overfilling the buffer. That is the flat line on the right of the diagram.
The pacing is why the fq qdisc matters. BBR hands the kernel a target rate, and the queueing discipline on the interface is what spaces packets out to hit that rate. The fq (fair queue) qdisc is the tested pairing and the one Google’s own deployments use. Modern kernels do have TCP-internal pacing that lets BBR work without fq, but the pairing that has been measured and recommended for years is fq — so we set both. The diagram below shows where each setting sits on the path from your application to the wire.
Step-by-step
1. Check which algorithms your kernel offers. This lists the congestion control modules currently available to load:
sysctl net.ipv4.tcp_available_congestion_control
Expected output on a stock kernel — bbr may or may not appear yet depending on whether the module is loaded:
net.ipv4.tcp_available_congestion_control = reno cubic
If bbr is missing here, it usually just means the module has not been loaded yet, not that it is absent. Continue to the next step.
2. Load the BBR module and confirm it. Load tcp_bbr, then check it is present:
sudo modprobe tcp_bbr
lsmod | grep bbr
Expected output:
tcp_bbr 20480 0
If modprobe returns module tcp_bbr not found, your kernel does not include BBR — see Troubleshooting. Otherwise, re-run the check from step 1 and bbr should now be listed.
3. Write the settings to a drop-in file. Do not edit /etc/sysctl.conf directly — a dedicated file in /etc/sysctl.d/ is easier to audit and survives package upgrades cleanly. Create it:
sudo tee /etc/sysctl.d/99-bbr.conf <<'EOF'
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
EOF
Expected output (the shell echoes what it wrote):
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
4. Make sure the module loads on every boot. The drop-in above sets the value, but the kernel still needs the module present at boot before it can honour bbr. On most systems the kernel auto-loads it when the sysctl is applied, but pin it explicitly to be safe:
echo tcp_bbr | sudo tee /etc/modules-load.d/bbr.conf
Expected output:
tcp_bbr
5. Apply everything now, without rebooting. sysctl --system reads every drop-in under /etc/sysctl.d/ and applies it:
sudo sysctl --system
Expected output (trimmed to the relevant lines):
* Applying /etc/sysctl.d/99-bbr.conf ...
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
6. Confirm the running values. Read the two settings back from the live kernel:
sysctl net.ipv4.tcp_congestion_control net.core.default_qdisc
Expected output:
net.ipv4.tcp_congestion_control = bbr
net.core.default_qdisc = fq
Validate it works
Reading the sysctl value tells you the default for new connections. To prove that real sockets are using BBR, inspect a live connection with ss -ti. Open a connection first (any outbound transfer works), then:
ss -ti
Look for bbr in the per-socket detail line, alongside the pacing rate BBR has chosen:
ESTAB 0 0 10.0.0.12:22 203.0.113.7:54432
bbr wscale:7,7 rto:212 rtt:11.4/2.1 mss:1448 pacing_rate 96.4Mbps ...
The word bbr and a pacing_rate field are the proof that this socket is model-paced, not sawtoothing on loss.
Measuring the actual benefit is where most people fool themselves. A single iperf3 run over a clean gigabit LAN will show BBR and CUBIC as a statistical tie, because there is no loss and no latency for BBR to exploit — and someone then concludes “BBR does nothing.” The benefit shows up on paths with latency and loss. To see it honestly:
- Test over a path that resembles production — real latency to a real remote host, not localhost.
- Run several passes per algorithm and compare medians, not one lucky run.
- Change one algorithm at a time: set
cubic, run; setbbr, run; on the same path in the same window.
A representative loopback-with-impairment test uses iperf3 against a remote server after adding artificial latency and loss on a throwaway interface with tc netem. Keep two caveats in mind: iperf3 measures a single bulk flow, which is the case BBR is best at and not necessarily what your real workload looks like; and netem on the sender shapes egress only. Treat the numbers as directional, and re-check with your real traffic before declaring victory.
Troubleshooting
bbr is not in tcp_available_congestion_control even after modprobe. If modprobe tcp_bbr reports module not found, the running kernel was built without BBR — common on minimal or very old vendor kernels. Fix it by installing a mainline-derived kernel (sudo apt install linux-generic on Ubuntu, or a newer kernel from your distro’s stable channel) and rebooting. Confirm with uname -r that you are on 4.9 or newer.
The setting reverts after a reboot. Almost always one of two things: the drop-in file has a typo (run sudo sysctl --system and watch for an error line), or the tcp_bbr module is not loaded early enough. Confirm /etc/modules-load.d/bbr.conf exists (step 4) and re-check with sysctl net.ipv4.tcp_congestion_control after the next boot.
BBR is set but ss -ti shows no pacing_rate / behaviour looks unchanged. You likely set tcp_congestion_control=bbr but left the qdisc as the default pfifo_fast. Confirm the qdisc with tc qdisc show dev eth0 — you want to see fq. If it still shows pfifo_fast, re-apply net.core.default_qdisc=fq and note that the qdisc default only applies to interfaces brought up after the change; bounce the interface or reboot.
No measurable change on a low-latency LAN. This is not a failure — it is expected. BBR and CUBIC perform almost identically when there is no queueing delay and no loss to react to. See the next section.
A container can’t set the sysctl. Inside an unprivileged container, net.ipv4.tcp_congestion_control is read-only and writing it fails with permission denied or read-only file system. Congestion control is a host-level, per-network-namespace setting — set it on the Docker/Kubernetes host, not inside the container. On the host, the two sysctls apply to every container sharing that network namespace.
When this is the wrong approach
BBR is a real improvement on the paths it is built for, and close to a no-op everywhere else. Do not reach for it when:
- The path is a clean, low-latency LAN. With sub-millisecond RTT and effectively zero loss, CUBIC already fills the pipe. BBR will not hurt, but it will not help either, and flipping it is not worth a change window.
- The bottleneck is not TCP. If your slow responses are really a saturated disk, a CPU-bound application, an undersized database, or a slow upstream API, congestion control is downstream of the actual problem. Profile the request path first; a network-transmit fix cannot speed up work that has not been produced yet.
- You do not control the host. On shared hosting or a locked-down platform where sysctl is read-only, you cannot set this, and that is by design. Raise it with the provider rather than fighting the namespace.
- You need strict fairness with CUBIC neighbours. BBRv1 can be aggressive toward loss-based flows sharing a bottleneck. On a link you share with traffic you do not control and must not starve, weigh that before switching fleet-wide.
For deeper kernel-tuning context, see kernel sysctl hardening for how to manage sysctl drop-ins safely, and swap and vm.swappiness tuning for another knob that is widely misunderstood. The kernel’s own reference is the Linux networking documentation, and per-socket behaviour is documented in the tcp(7) man page.
If this is the kind of work you’d rather never own again, it’s the daily job of Managed Cloud Ops — book an infrastructure review.