How to Boost Linux Server Internet Speed with TCP BBR

Channel: Network Monitoring Tools Linux
Abstract: 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

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

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

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 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

Ref From: tecmint
Channels: TCP BBR

Related articles