How to Boost Linux Server Internet Speed with TCP BBR

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'
Check Kernel Modules
Check Kernel Modules

To update your kernel, check out these guides:

  1. How to Upgrade Kernel to Latest Version in Ubuntu
  2. 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
Enabling TCP BBR in Linux
Enabling TCP BBR in Linux

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.

Verify Kernel Parameters
Verify Kernel Parameters

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:

  1. How to Test Your Internet Speed Bidirectionally from Command Line Using ‘Speedtest-CLI’ Tool

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.

  1. Setup Your Own “Speedtest Mini Server” to Test Internet Bandwidth Speed
  2. How to Limit the Network Bandwidth Used by Applications in a Linux System with Trickle
  3. 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

Hey TecMint readers,

Exciting news! Every month, our top blog commenters will have the chance to win fantastic rewards, like free Linux eBooks such as RHCE, RHCSA, LFCS, Learn Linux, and Awk, each worth $20!

Learn more about the contest and stand a chance to win by sharing your thoughts below!

Aaron Kili
Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

6 Comments

Leave a Reply
  1. @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!

    Reply
  2. 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?

    Reply
    • @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.

      Reply
      • 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?

        Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.