How to Deploy Google BBRon CentOS 7
How to Deploy Google BBR on CentOS 7
BBR (Bottleneck Bandwidth and RTT) is a new congestion control algorithm which is contributed to the Linux kernel TCP stack by Google. With BBR in place, a Linux server can get significantly increased throughput and reduced latency for connections. Besides, it’s easy to deploy BBR because this algorithm requires only updates on the sender side, not in the network or on the receiver side.
In this article, I will show you how to deploy BBR on a Vultr CentOS 7 KVM server instance.
Prerequisites
- A Vultr CentOS 7 x64 server instance.
- A sudo user.
Step 1: Upgrade the kernel using the ELRepo RPM repository
In order to use BBR, you need to upgrade the kernel of your CentOS 7 machine to 4.9.0. You can easily get that done using the ELRepo RPM repository.
Before the upgrade, you can take a look at the current kernel:
1 |
|
This command should output a string which resembles:
3.10.0-514.2.2.el7.x86_64
As you see, the current kernel is 3.10.0.
update and install the ELRepo repo:
1 |
|
Install the 4.9.0 kernel using the ELRepo repo:
1 |
|
Confirm the result:
1 |
|
If the installation is successful, you should see kernel-ml-4.9.0-1.el7.elrepo.x86_64 among the output list:
kernel-ml-4.9.0-1.el7.elrepo.x86_64
kernel-3.10.0-514.el7.x86_64
kernel-tools-libs-3.10.0-514.2.2.el7.x86_64
kernel-tools-3.10.0-514.2.2.el7.x86_64
kernel-3.10.0-514.2.2.el7.x86_64
Now, you need to enable the 4.9.0 kernel by setting up the default grub2 boot entry.
Show all entries in the grub2 menu:
1 |
|
The result should resemble:
CentOS Linux 7 Rescue a0cbf86a6ef1416a8812657bb4f2b860 (4.9.0-1.el7.elrepo.x86_64)
CentOS Linux (4.9.0-1.el7.elrepo.x86_64) 7 (Core)
CentOS Linux (3.10.0-514.2.2.el7.x86_64) 7 (Core)
CentOS Linux (3.10.0-514.el7.x86_64) 7 (Core)
CentOS Linux (0-rescue-bf94f46c6bd04792a6a42c91bae645f7) 7 (Core)
Since the line count starts at 0 and the 4.9.0 kernel entry is on the second line, set the default boot entry as 1:
1 |
|
Reboot the system:
1 |
|
When the server is back online, log back in and rerun the uname command to confirm that you are using the correct Kernel:
1 |
|
You should see the result as below:
4.9.0-1.el7.elrepo.x86_64
Step 2: Enable BBR
In order to enable the BBR algorithm, you need to modify the sysctl configuration as follows:
1 |
|
Now, you can use the following commands to confirm that BBR is enabled:
1 |
|
The output should resemble:
net.ipv4.tcp_available_congestion_control = bbr cubic reno
Next, verify with:
1 |
|
The output should be:
bbr
Finally, check that the kernel module was loaded:
1 |
|
The output will be similar to:
1 |
|