frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

TCP BBR activation on CentOS server

TCP BBR (Bottleneck Bandwidth and Round-trip propagation time) is a new TCP congestion mechanism developed by Google. TCP BBR measures congestion by measuring RTT time, which can help ensure higher and more stable network bandwidth while improving packet latency. BBR responds to changing network conditions but continues to be aggressive in transferring as much data as possible, even in the event of short-term network problems.

BBR can be activated on most Linux-based operating systems. In this tutorial, we will explain how BBR can be activated in CentOS 7.

Requirements

One of the main requirements for BBR to be enabled on hardware is a kernel version that must be at least 4.9.

Because Time4VPS Container VPS servers run stable kernel version 3.10.0 and Storage VPS servers run kernel version 2.6.32, you will not be able to activate BBR on these servers. So, you need to have a Linux VPS server.

The kernel version can be checked with the following command:

uname -r

If the kernel version is too low, you can upgrade it.

Enabling BBR

All you need to do to enable BBR is to edit the sysctl settings by adding certain parameters to sysctl.conf file. Those settings are FQ (Fair queue) and also BBR.

You can either add certain values via your vi editor:

vi /etc/sysctl.conf

The values are:

net.core.default_qdisc=fq
net.ipv4.tcp_congestion_control=bbr

Confirm changes with sysctl command:

sysctl --system

Or with echo:

echo 'net.core.default_qdisc=fq' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv4.tcp_congestion_control=bbr' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

Checking if the BBR is enabled

You can check if TCP BBR is enabled with the command below:

sudo sysctl net.ipv4.tcp_available_congestion_control

The output should be similar to this:

net.ipv4.tcp_available_congestion_control = bbr cubic reno

You can also use:

sudo sysctl -n net.ipv4.tcp_congestion_control

You should also see bbr in the output:

bbr

Testing

You can run some tests, like iperf3 or wget, and check whether the speed has improved.

Before

After

Before

After

Of course, keep in mind that speed depends on a variety of factors, so this solution is not what will solve all the problems with the network speed. There are sources where the speed improvement with the BBR has improved significantly but for others the speed increases by just a few megabytes. BBR is most commonly used to improve the performance of a multi-hop network. For example, one server in Europe and another in America.

You can find more information about the congestion control algorithm in the Google documentation.

Tagged:
Sign In or Register to comment.

Learn how to install a web and database server, email, FTP client or other applications. Discover and share information on server security or optimization recommendations.
Feel free to join our constantly expanding community, participate in discussions, strengthen your knowledge on Linux and Windows server management!
© 2013 - 2020 Time4VPS. All rights reserved.

Get In Touch