If your users are far from your server — China to Los Angeles, Europe to Hong Kong — the TCP congestion control algorithm on the server can make a large difference to download speed. Google’s BBR algorithm is built into every modern Linux kernel and usually takes two lines to enable.
Why BBR helps
Traditional algorithms such as CUBIC (the Linux default) treat packet loss as a sign of congestion and slow down sharply when they see it. On long international routes, a little loss happens even when the link is not full, so CUBIC keeps backing off and never reaches the available speed.
BBR instead measures the path’s actual bandwidth and round-trip time and sends at that rate. On high-latency links with some random loss — typical of cross-border traffic — it often delivers several times the throughput of CUBIC. On a clean, short link (server and user in the same city) the difference is small.
BBR changes only how your server sends. It improves downloads from the server (web pages, files, video) and does not need anything installed on the client.
Requirements
BBR needs Linux kernel 4.9 or newer. Check with:
uname -r
| Distribution | Default kernel | BBR available |
|---|---|---|
| Ubuntu 20.04 / 22.04 / 24.04 | 5.4 / 5.15 / 6.8 | Yes |
| Debian 11 / 12 | 5.10 / 6.1 | Yes |
| AlmaLinux / Rocky 8 and 9 | 4.18 / 5.14 | Yes |
| CentOS 7 | 3.10 | No — needs a newer kernel (e.g. ELRepo) |
If you are on CentOS 7, the simplest fix is to reinstall with a current distribution from the control panel.
Check what you are using now
sysctl net.ipv4.tcp_congestion_control
sysctl net.ipv4.tcp_available_congestion_control
If the second command does not list bbr, load the module: sudo modprobe tcp_bbr.
Enable BBR
Create a sysctl file so the setting survives reboots:
sudo tee /etc/sysctl.d/99-bbr.conf >/dev/null <<'EOF'
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
EOF
sudo sysctl --system
fq (fair queueing) is the packet scheduler BBR was designed to work with.
Verify
sysctl net.ipv4.tcp_congestion_control # should print: bbr
sysctl net.core.default_qdisc # should print: fq
lsmod | grep bbr # tcp_bbr should be loaded
New connections use BBR immediately; existing ones keep their old algorithm until they reconnect.
Measure the difference
Test before and after with a large file downloaded from the location your users are in:
# On the server: create a 500 MB test file in your web root
fallocate -l 500M /var/www/html/test.bin
# On the client
curl -o /dev/null -w "%{speed_download}\n" http://YOUR_SERVER_IP/test.bin
The result is in bytes per second. Run it several times, and at the evening peak if your users are in China, because that is when loss is highest. Delete the test file afterwards.
Optional: larger TCP buffers
For very high-bandwidth, high-latency transfers (for example 1 Gbps between Los Angeles and Asia), the default buffer sizes can become the limit. These values are a reasonable starting point:
sudo tee -a /etc/sysctl.d/99-bbr.conf >/dev/null <<'EOF'
net.core.rmem_max = 67108864
net.core.wmem_max = 67108864
net.ipv4.tcp_rmem = 4096 87380 67108864
net.ipv4.tcp_wmem = 4096 65536 67108864
EOF
sudo sysctl --system
Do not copy long “ultimate optimisation” sysctl lists from forums; many settings are obsolete or harmful on current kernels.
What BBR cannot do
BBR makes better use of the path you have; it does not change the path. If your traceroute goes over a congested 163 backbone at peak hours, a CN2 GIA route will still be far better. Test the routes first with our latency testing guide, then add BBR on top.
Windows
Current Windows Server releases use CUBIC by default, and BBR is not a supported option for Windows Server. On Windows, choosing the right route matters far more than TCP tuning.
Related
- CN2 GIA explained
- Los Angeles dedicated servers with 1 Gbps unmetered
- Initial Linux server setup