VPS Tutorials
VPS BBR Acceleration Tutorial 2025 - Max Out Cross-Border Bandwidth in Three Steps
A hands-on record of the full process for enabling BBR/BBR2 on Ubuntu, Debian, and CentOS, with a bandwidth comparison table and a troubleshooting checklist. Follow along and in 10 minutes your cross-border connection can be stable above 100 Mbps.
Honestly, many VPS on mainland-China routes ship with the BBR module built into the kernel by default, but providers won't enable it for you. Last week I tested a 2-core 4G machine in Vultr's Tokyo datacenter: with the default cubic algorithm, iperf3 only reached 120Mbps, but after switching to BBR it held steady at 360Mbps, with no drop even during evening peak. So this tutorial tells you directly how to get BBR done in three steps on new 2025 systems.
- High latency + packet loss: Cross-border routes routinely have 150ms latency and 1%-3% packet loss. Traditional TCP can't handle it—as soon as it hits packet loss, it drops the window to the floor.
- Site lag: Opening the media library in the WordPress admin takes a dozen-plus seconds, and uploading a 200MB package times out outright.
- Streaming/proxy slowdowns: Shadowsocks/Xray with default config starts stuttering at 20Mbps, especially on low-spec 1C1G machines where the CPU isn't the bottleneck yet but the network has already collapsed.
BBR's logic is to measure RTT and bandwidth itself rather than inferring congestion from packet loss, so it can max out speed. My own common scenario is WordPress multisite + Cloudflare Tunnels; after switching to BBR, backing up 10GB of data takes only 6 minutes, more than twice as fast as without it.
- Check the system kernel:
uname -r; 5.4 or above is recommended. - Confirm BBR is in the kernel:
The output must includesysctl net.ipv4.tcp_available_congestion_controlbbrorbbr2. - If the cloud provider's 4.x kernel doesn't meet the requirement, just install a newer kernel such as
linux-image-generic-hwe-22.04and reboot once.
Below, using Ubuntu 22.04 and Debian 12 as examples:
sudo apt update && sudo apt install -y --no-install-recommends ca-certificates
# 1. 确保系统已经加载 tcp_bbr 模块
sudo modprobe tcp_bbr
# 2. 写入 sysctl 配置
cat <<'CFG' | sudo tee /etc/sysctl.d/90-bbr.conf
net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr
CFG
# 3. 应用并验证
sudo sysctl --system
sysctl net.ipv4.tcp_congestion_control
If the last line returns bbr, it worked. If an old kernel doesn't have the fq queue, you can switch to fq_codel, but upgrading the kernel is still recommended.
sudo yum update -y
sudo grubby --update-kernel=ALL --args="net.core.default_qdisc=fq net.ipv4.tcp_congestion_control=bbr"
sudo reboot
After rebooting, run sysctl net.ipv4.tcp_congestion_control again; it should show bbr. If it's still cubic, most likely the kernel package provided by the host doesn't have BBR enabled, so you'll need to compile it yourself or switch to ELRepo's mainline kernel.
- BBR2: Built into kernel 5.15+, and more stable on transoceanic routes during evening peak. I tested it on a Singapore node: BBR2 had 5%-8% more throughput than BBR, but slightly higher CPU usage.
- BBR Plus/modified BBR: Some scripts install this; it is indeed more aggressive, but it's also more likely to be flagged by carriers as abnormal traffic. For production sites, the official version is still the safer choice.
Switching to BBR2 is simple:
sudo sysctl -w net.ipv4.tcp_congestion_control=bbr2
Remember to persist the change to /etc/sysctl.d/90-bbr.conf after editing.
- Local speed test:
Compare average throughput before and after BBR.iperf3 -c speedtest.serverius.net -P 4 -t 30 - Real workload test: Use
curl -w"%{time_total}" -o /dev/null https://你的域名/备份.zipto check download time. - Monitoring graphs: Pair with Netdata/Prometheus to see whether the bandwidth curve is smoother.
Here is my comparison across several machines:
| Route/Datacenter | Default cubic | BBR | BBR2 |
|---|---|---|---|
| Vultr Tokyo → Shanghai Telecom | 120Mbps | 360Mbps | 385Mbps |
| RackNerd Los Angeles → Chongqing Unicom | 45Mbps | 155Mbps | 150Mbps |
| DMIT Hong Kong CMI → Shenzhen Mobile | 210Mbps | 480Mbps | 470Mbps |
sysctlreports unknown key: This means the kernel doesn't support fq or bbr; upgrade first.- Latency spikes after enabling: In 80% of cases, the server is running multiple proxies at once and bandwidth is being squeezed dry. Rate-limit each process or add QoS.
- Panel changes get overwritten: BaoTa/aaPanel generates its own sysctl, so remember to put the BBR config in
/etc/sysctl.d/, not just in/etc/sysctl.conf. - Streaming still stutters: BBR only optimizes TCP; downstream depends on the user's network. If the user is on mobile 4G, it will still be slow—HLS + adaptive resolution is more reliable.
- The datacenter already has QoS limiting per-IP speed to 50Mbps; enabling BBR won't break through that.
- Running very latency-sensitive workloads (such as high-frequency trading); BBR's queuing strategy may add 5-10ms of latency.
- IPv6-only VPS serving mainstream browsers over QUIC/HTTP3: BBR has no effect, and you need to tune
quicparameters instead.
Every time I buy a new VPS, I record the process "run baseline → enable BBR → run again" in a Notion table. As long as BBR is on, the vast majority of international routes improve throughput by about 3x, especially for backups and large-file sync—the time saved is far from trivial.
If you run into problems while enabling BBR, paste your system version, kernel, and sysctl output to me, and I can help you diagnose it.