How to Enable Google’s TCP BBR on a Linux VPS

How to enable Google's TCP BBR on a Linux VPS

This article was contributed by Dustin B. Cisneros of RackNerd – LowEndBox appreciates your contribution as always! Be sure to check out RackNerd’s latest LowEndBox specials if you are looking for a KVM VPS.

Google’s TCP BBR, or “Bottleneck Bandwidth and Round-trip propagation time,” is a congestion control system based on cutting-edge technology. It is the same system used for traffic through Google.com, as well as YouTube. It was the reason that YouTube’s network throughput was increased by 4% annually. Moreover, Google’s BBR also significantly reduces latency as the querying, and queuing delays are minimized.

We have written this guide for you so that you can enable Google’s BBR on your Linux virtual private server.

There would be two steps in the guide, where step 1 can be optional in some instances. Let us start!

Step 1. Check and upgrade your kernel

We need Linux kernel version 4.9.0 or higher to support Google’s BBR. We will guide you on how to update it for both CentOS 7 and Ubuntu. 

To check your current kernel version, run this command:

uname -r

If this command returns a kernel version higher than 4.9.0, then you can skip step 1.

CentOS 7 Based Systems:
1) Install Elrepo repo

To update the CentOS kernel, we need to install the Elrepo repo via the following commands:

sudo rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm

2) Update your kernel

To install the updated kernel, run the following two commands:

sudo yum –enablerepo=elrepo-kernel install kernel-ml -y

yum list installed kernel

3) Set default boot entry

Run this command to see the list of kernels:

sudo egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d ’

You should find your newly installed kernel at the top of the list. Then run the following command:

sudo grub2-set-default 0

4) Reboot and verify

Now reboot your VPS, and after it turns back on, rerun the following command to verify the install:

uname -r

Ubuntu 18.04 Based Systems

The kernel version should be compatible with Google’s BBR if you are running Ubuntu 18.04. However, you can still upgrade the kernel using the following commands.

cd /tmp/

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4.13/linux-headers-5.4.13-050413_5.4.13-050413.202001171431_all.deb

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4.13/linux-headers-5.4.13-050413-generic_5.4.13-050413.202001171431_amd64.deb

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4.13/linux-headers-5.4.13-050413-lowlatency_5.4.13-050413.202001171431_amd64.deb

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4.13/linux-image-unsigned-5.4.13-050413-generic_5.4.13-050413.202001171431_amd64.deb

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4.13/linux-image-unsigned-5.4.13-050413-lowlatency_5.4.13-050413.202001171431_amd64.deb

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4.13/linux-modules-5.4.13-050413-generic_5.4.13-050413.202001171431_amd64.deb

wget https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.4.13/linux-modules-5.4.13-050413-lowlatency_5.4.13-050413.202001171431_amd64.deb

sudo dpkg -i *.deb

After running the commands, reboot your VPS by running the “reboot” command.

Step 2. Enable Google’s TCP BBR

The instructions below are the same for both CentOS and Ubuntu.

To start, open “/etc/sysctl.conf” in any text editor, or run the command to open it in vim or nano (your preferred text editor):

sudo vim /etc/sysctl.conf

At the end of the config file, add the following lines:

net.core.default_qdisc=fq

net.ipv4.tcp_congestion_control=bbr

Then save the file, and refresh your configuration using this command:

sudo sysctl -p

Google’s BBR congestion control system has now been enabled on your VPS, to verify this, run this command:

sysctl net.ipv4.tcp_congestion_control

If the enabling process were successful, the output would be:

net.ipv4.tcp_congestion_control = bbr

You have now successfully enabled Google’s TCP BBR on your VPS!

Have you enabled Google’s TCP BBR on your Linux VPS? Have you seen any performance benefits? Please leave your questions or feedback in the comments section below!

The post How to Enable Google’s TCP BBR on a Linux VPS appeared first on Low End Box.

Read more »

Google Adsense: Why it is Important to Get Approved for

Google Adsense: Why it is Important to Get Approved for the Program and the Advantages of Not Getting Your Own Blog Site Why Do I Have to Get Approved for the Google Adsense Program Its not really about you. Google has standards to which they adhere and there are certain sites that they dont want […] Read more »

Google Adsense: Why Do I Need Google Adsense?

Because its there, its fun and its free. If youre reading this, you obviously have some interest in the internet. You dont even have to have your own site, although the more sites you use Google Adsense on, the more money you will make. For example, anyone can write a blog even if its just […] Read more »

Google Adsense: Where to Place Ads on Your Web Pages

Google Adsense: Where to Place Ads on Your Web Pages and a Profile of Bloggerparty.com Deciding Where to Place Your Google Ads on Your Web Pages so That They Will Be Most Profitable This is one of the best parts of the whole Google Adsense experience. No one else gets to make this decision except […] Read more »

Google Adsense: When Do I Get Paid Using Google Adsense?

Google Adsense: When Do I Get Paid Using Google Adsense? Google Adsense pays you approximately 30 days after the end of the month in which you become eligible to receive payment. You become eligible for payment only when your Adsense account reaches at least $100.00. Suppose, for example, you started in January and at the […] Read more »

Google Adsense: What Other Forms of Payment Does Google Adsense

Google Adsense: What Other Forms of Payment Does Google Adsense Offer? You can elect to have your Google Adsense payments mailed to you via check in your local currency. Google Adsense offers this option in 42 countries. Check the Google Adsense support center to see if your country is included in this list. To select […] Read more »

Google Adsense: What is Google Adsense for Search

Google Adsense for Search is different than Adsense for Content but it is just as important to your earning power with the Google Adsense program. Just like Adsense for Content places targeted ads on your content pages, Adsense for Search places targeted ads on the results page of the search set in motion on your […] Read more »

Google Adsense: Using Google Adsense Without a Complete Website and

Google Adsense: Using Google Adsense Without a Complete Website and Promoting Your Blog to Earn Money Through the Program Can I use the Google Adsense Program if I Do Not Have a Personal Website? You dont have to have your own website to use Google Adsense. Google doesnt usually approve personal pages but that is […] Read more »

Google Adsense: Understanding Image Ads and Making Google Adsense Dollars

Google Adsense: Understanding Image Ads and Making Google Adsense Dollars with Writingup.com What are image ads? Image ads are graphical ads. Unlike traditional banner ads, image ads are also targeted to the appropriate audience, just like text ads. A publisher that has a combination of image ads and text ads has a greater revenue generating […] Read more »

Google Adsense: Tips for Using Google Adsense

Like anything else, youll get out of Google Adsense what you put into it. The following optimization tips can help you grow your Google Adsense dollars: Write interesting content and write every day. Have more than one site. The more sites you have, the more ads have the potential to get clicked. Set up channels […] Read more »