Enabling TCP BBR on Linux: What It Does, When It Helps and How to Measure It
BBR is Google's congestion control algorithm that speeds up sending from your server over long, lossy paths. Enable it in two lines and measure the difference properly.

Table of contents
Every TCP connection has to guess how fast it can send. Linux’s default algorithm, CUBIC, is loss-based: it speeds up until a packet is lost, then backs off. On long paths, say a server in Europe and a user in Iran, with a little random loss, that behaviour means the connection never reaches the path’s real capacity.
BBR, introduced by Google in 2016, measures two things instead of loss: the bottleneck bandwidth and the minimum RTT of the path, and paces its sending rate according to that model. The result is usually higher throughput on high-latency links and shorter queues in routers.
Prerequisites and current state
uname -r
sysctl net.ipv4.tcp_congestion_control
sysctl net.ipv4.tcp_available_congestion_control
sysctl net.core.default_qdisc
BBR has been in Linux since kernel 4.9, and current distributions (Ubuntu 22.04 and 24.04, Debian 12, Rocky 9) ship it as a module. If bbr isn’t in the available list, load the module and make it persistent across reboots:
sudo modprobe tcp_bbr
echo tcp_bbr | sudo tee /etc/modules-load.d/bbr.conf
Enabling it
sudo tee /etc/sysctl.d/90-bbr.conf >/dev/null <<'EOF'
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
EOF
sudo sysctl --system
The change applies immediately to new connections; existing ones keep their old algorithm. The fq qdisc is what BBR’s developers themselves recommend, so packets are sent evenly spaced (paced).
default_qdisc only affects interfaces created after the change. For the current interface, either reboot or switch the qdisc by hand (find the interface name with ip -br link):
sudo tc qdisc replace dev eth0 root fq
Verifying
sysctl net.ipv4.tcp_congestion_control
tc qdisc show dev eth0
ss -tin | grep -c bbr # how many open connections use BBR
Important: BBR only changes the sending side
Congestion control runs on whichever side sends the data. BBR on the server improves users’ downloads from the server; a user’s upload speed to the server is decided by the algorithm on the user’s own device. So if the complaint is slow uploads, BBR on the server will do almost nothing.
Measuring properly, before and after
Test from a machine whose path resembles your real users’, not from a neighbouring server in the same data centre; at 1 ms of RTT you won’t see any difference. With iperf3 in reverse mode, the server becomes the sender:
# on the server
iperf3 -s
# on the client: 30 seconds, 4 parallel streams, data flows server to client
iperf3 -c SERVER_IP -R -t 30 -P 4
Test once with cubic and once with bbr (you can switch back temporarily with sudo sysctl -w net.ipv4.tcp_congestion_control=cubic), and repeat each test several times; a single run over the internet is not reliable. You will see the biggest difference on paths with high RTT and low but persistent loss.
TCP buffers for fast, distant links
The most data one connection can have “in flight” is bandwidth multiplied by RTT. For a 1 Gbit/s link with 100 ms of RTT that is about 12.5 MB, more than the default send-buffer ceiling on many kernels. If your server serves distant users over a lot of bandwidth, raise the buffer limits:
# /etc/sysctl.d/91-tcp-buffers.conf
net.core.rmem_max = 33554432
net.core.wmem_max = 33554432
net.ipv4.tcp_rmem = 4096 131072 33554432
net.ipv4.tcp_wmem = 4096 16384 33554432
net.ipv4.tcp_mtu_probing = 1
These are ceilings, not fixed sizes; kernel autotuning only grows buffers that far when it needs to. tcp_mtu_probing lets the kernel shrink packet size when large packets silently disappear, which is common on tunnels and with some carriers.
Limitations
- On OpenVZ and LXC servers the kernel is shared between customers and you can’t change the algorithm.
- The BBR in mainline Linux is the first version of the algorithm, which can take more than its fair share of bandwidth when competing with CUBIC flows. That’s fine for web and download servers, but don’t switch it on everywhere on a shared network without a reason.
- BBR isn’t magic: if the bottleneck is the server’s port speed or a carrier’s limit, no algorithm gets past it.
To find where slowness really comes from, see our Linux network troubleshooting guide.



Comments
No comments yet. For technical questions, include the details (OS version, the exact error and the command you ran) to get a precise answer.