BBR (Bottleneck Bandwidth and RTT) is a relatively new congestion control algorithm written by software engineers at Google. It is the latest solution out of Google’s persistent attempts to make the Internet faster via the TCP protocol – the workhorse of the Internet.
The primary aim of BBR is to boot network utilization and reduce queues (that result into slow network activity): it should be deployed on servers, but not in the network or the client side. In Linux, BBR is implemented in kernel version 4.9 or higher.
In this article, we will briefly explain TCP BBR, then proceed to show how to boost a Linux server Internet speed using TCP BBR congestion control in Linux.
Requirements
You should have Linux kernel version 4.9 or above installed, compiled with these options (either as a module or inbuilt into it):
- CONFIG_TCP_CONG_BBR
- CONFIG_NET_SCH_FQ
- CONFIG_NET_SCH_FQ_CODEL
How to Check Kernel Modules in Linux
To check if the above options are compiled in your kernel, run these commands:
# cat /boot/config-$(uname -r) | grep 'CONFIG_TCP_CONG_BBR' # cat /boot/config-$(uname -r) | grep 'CONFIG_NET_SCH_FQ'
To update your kernel, check out these guides:
- How to Upgrade Kernel to Latest Version in Ubuntu
- How to Install or Upgrade to Latest Kernel Version in CentOS 7
Enabling TCP BBR Congestion Control in Linux
BBR works effectively with pacing, so it must be employed together with the fq qdisc classless packet scheduler for traffic pacing. To find more information about fq qdisc, type:
# man tc-fq
With the fair understanding of BBR, you can now configure it on your server. Open the /etc/sysctl.conf file using you favorite editor.
# vi /etc/sysctl.conf
Add the options below at the end of the file.
net.core.default_qdisc=fq net.ipv4.tcp_congestion_control=bbr
Save and close the file. Then effect the changes in the system using the sysctl command.
# sysctl --system
From the screen shot blow, you can see the options have been added with the appropriate values.
Testing TCP BBR Congestion Control Configuration
After performing the necessary configurations, you can test if it is practically working. There are several tools for measure bandwidth speed such as Speedtest-CLI:
Other tools include bmon (bandwith monitor), nload, Wget – command based file downloader and cURL which all show network bandwidth; you can use them for testing.
BBR Github repository: https://github.com/google/bbr
You may also like to read following related articles.
- Setup Your Own “Speedtest Mini Server” to Test Internet Bandwidth Speed
- How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle
- How to Change Kernel Runtime Parameters in a Persistent and Non-Persistent Way
In this article, we showed how to boost Linux server Internet speed using TCP BBR congestion control in Linux. Test it comprehensively under different scenarios and give us any important feedback via the comment form below.
Credit: Nixcraft
@Tomas @Aaron,
there is a little bit of a miss-understanding here or at least you are missing some important details. If you have a 100Mbit line you could saturate it with approx. 10MB/sec at best. If you are at the opposite of the globe you will get packet loss and longer packet traveling times (RTT). Then your speed will perhaps max. out at 2-3MB/sec due to how TCP was designed.
BBR will improve on multi-hop network performance, e.g. when your server is in Asia and your clients are in Europe or US. Or satellite links or HSDPA slow wireless networks or…
It will NOT increase the physical output at the first hop from your server to your ISPs network port!
@Bytesplit
Thanks a lot for the useful information, we do more research concerning what you have shared here.
A couple of questions if I may. Explanation is a bit vague therefore any clarification is really appreciated.
So I’ve got a dedicated HP server with a 100Mbps dedicated network link (with a 10Gbps network card). When I use the Speedtest-CLI utility I get the result that’s very close to 100Mbps – all good.
The article says that I can boost my Linux server internet speed by using TCP BBR congestion control (I have a suitable kernel already). Are you suggesting that I can go above 100Mbps if I use TCP BBR?
@Tomas
Yes, we are suggesting that you can go above 100Mbps if you use TCP BBR, it is designed to increase server speeds on the Internet. BBR is already widely deployed on servers at Google where it was developed.
Hmm, by my ISP has a cap of 100Mbps (the capacity I pay for), how can I go beyond that limit? I’m puzzled as this would imply I can bypass any ISP restrictions. Any ideas?
@Tomas
If there are ISP restrictions then going beyond 100Mbps will be a little bit of a challenge, unless you pay more bucks.