BBR (Bottleneck Bandwidth and Round-trip propagation time) is a new congestion control algorithm developed by Google. Congestion control algorithm decides how fast to send data to the receiver. With BBR from Google, it’s possible to get increased throughput and also reduced latency for connections. In this article, I will show you how you can get BBR on CentOS 7.
Prerequisites
- CentOS 7 x64
- sudo / root user
Step 1 – Install The Latest Stable Kernel
To get BBR you need to get the latest stable kernel on CentOS 7. It is possible to install it using ELRepo RPM repository.
Import the ELRepo GPG Key:
rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
Install the ELRepo repository:
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
Install the latest stable kernel using the ELRepo repository:
yum –enablerepo=elrepo-kernel install kernel-ml -y
Check latest stable kernel installation
rpm -qa | grep kernel
kernel-3.10.0-693.11.1.el7.x86_64
abrt-addon-kerneloops-2.1.11-48.el7.centos.x86_64
kernel-tools-libs-3.10.0-693.11.1.el7.x86_64
kernel-tools-3.10.0-693.11.1.el7.x86_64
kernel-headers-3.10.0-693.11.1.el7.x86_64
kernel-3.10.0-327.el7.x86_64
kernel-ml-4.14.3-1.el7.elrepo.x86_64
kernel-debug-devel-3.10.0-693.11.1.el7.x86_64
Step 2 – Enable The Latest Stable Kernel
Check all entries in the grub2 menu
egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d ‘
CentOS Linux (4.14.3-1.el7.elrepo.x86_64) 7 (Core)
CentOS Linux (3.10.0-693.11.1.el7.x86_64) 7 (Core)
CentOS Linux (3.10.0-327.el7.x86_64) 7 (Core)
CentOS Linux (0-rescue-e97aff49e3774f639070a9a86911b971) 7 (Core)
Set the default boot entry
the count starts at 0 and the latest stable kernel is on the first line thus set it to 0.
grub2-set-default 0
Reboot your machine now
shutdown -r now
Once the server is back online, verify current kernel version
uname -r
4.14.3-1.el7.elrepo.x86_64
Such output should confirm that the Latest Stable Kernel is fully installed.
Step 3 – Enable Google BBR
To enable Google BBR you need to modify systctl, run below commands to do it
echo ‘net.core.default_qdisc=fq’ | tee -a /etc/sysctl.conf
echo ‘net.ipv4.tcp_congestion_control=bbr’ | tee -a /etc/sysctl.conf
sysctl -p
Verify if Google BBR is enabled
lsmod | grep bbr
tcp_bbr 20480 0
Such output confirms that Google BBR is fully installed and enabled.
Reference: https://github.com/google/bbr
If you face any issue during the whole process don’t hesitate to comment.
Thanks for reading this article.