What is bbr?
BBR means Congestion-Based Congestion Control. Its a TCP congestion control mechanism, interpreting packet loss as “congestion”. There are different TCP congestion control mechanism available and Google BBR is one of them. RENO and CUBIC are few other TCP congestion control mechanism available.
The TCP congestion control mechanism like RENO and CUBIC are loss-based congestion control mechanism. Using it will cause low throughput when bottleneck buffers are small and when bottleneck buffers are large it causes buffer-bloat.
For Fixing these problems, a TCP delay-controlled TCP flow control algorithm from Google, called BBR implemented. Google BBR efficiently control the buffer-bloat and low throughput by continuously estimate the flow’s RTT and the flow’s sustainable bottleneck capacity.
Google Cloud Platform, GCP uses BBR and allows Applications to load lightning speed over the public network. Google services like YouTube uses this BBR and users will get better experience from YouTube.
Benefits of Google BBR
Now suppose there is live website in BBR enabled server then the website content is sent to users browsers using BBR. This means faster webpage downloads for users of your site.
There is also a bbr github repository available with scripts, and other materials related to the BBR congestion control algorithm.
How we can Install or Enable Google BBR ?
Currently Google BBR can only be enabled in Linux operating systems. Suppose we have Linux machine is running kernel 4.9 or newer, we can enable BBR. By default the Linux servers uses Reno and CUBIC but the latest version kernels also includes the google BBR algorithms and can be enabled manually.
So a normal question arise is does windows support BBR? If not what is the TCP congestion control mechanism used by a windows servers ?. So lets deviate a little and see whats happening in a windows server. Use below command to show the enabled TCP congestion control mechanism in a Windows server.
Take a look at the “Add-On Congresion Control” parameter.
none: Use the built-in standard congestion control algorithm.
ctcp : Use the add-on Compound TCP congestion control algorithm.
The powershell command is
Okay, as per the results, the windows server 2016 and 2012 uses the default congestion control algorithm as DCTCP. Another one supported is CTCP.
Below is definition of both congestion control algorithm as per Microsoft docs.
CTCP. Compound TCP increases the receive window and amount of data sent. This value can improve throughput on higher latency connections.
DCTCP. Data Centor TCP adjusts the TCP window based on network congestion feedback based on Explicit Congestion Notification (ECN) signalling. This value can improve throughput on low latency links.
From windows server 2019 onward the default one become CUBIC, like Linux.
Now lets see how Google BBR can be enabled in Linux.
On centos 8
Issue below command to know the current kernel.
Issue Below commands to know the current tcp congestion control
Out of the box, Linux uses Reno and CUBIC and the default one is cubic
In case of centos 8, we can see the default kernel is 4.18 which is already higher than the needed 4.9.
So add below lines in /etc/sysctl.conf and issue command sysctl -p
Issue below commands to verify.
Now lets take a look how it can be done in centos 7
Verify the kernel using below command.
Import the ELRepo GPG Key:
Install the ELRepo repository:
Install the latest stable kernel using the ELRepo repository:
Check latest stable kernel installation
Show all entries in the grub2 menu:
Indexing starts at 0. This means that the 5.7 ( which is the latest one installed) kernel is located at 1:
set the default kernel
After reboot, verify the loaded kernel.
On Ubuntu 18.04, the kernel version is greater than 4.9. So just need to add sysctl entry, like we did it earlier and that will enable Google bbr on Ubuntu 18.04
For Ubuntu 16 follow below steps.
Verify the current kernel version
Install Hardware Enablement Stack (HWE) to update kernel automatically:
reboot the server and issue below command for enabling bbr
For enabling it in Ubuntu 14 or Debian 8 follow below steps.
Download a latest kernel from repo ulr https://kernel.ubuntu.com/~kernel-ppa/mainline/
After that enable BBR as usual.
Google BBR testing with iperf
The iperf is a commonly used network performance measurement tool available in Linux. It measures the throughput of the network. lets use the command for testing the network Performance.
In the server issue below command. If the command is not found install it using apt-get.
After that issue below command in your client PC.
Below is the test results before enabling Google BBR
Test Results After BBR enabled.
BBR congestion control PRE and POST average stats collected for 30 seconds using the iperf command is
Pre results : BBR 281 MBytes 76.7 Mbits/sec
POST result : BBR 283 MBytes 79.0 Mbits/sec
In our case there wasn’t any high change in the speed but showed a difference. Feel free to test it on your servers. This concluded the BBR setup and testing in a Linux Box. Post your comments in the comment box provided below.