Upgrade CentOS Kernel and Enable Google BBR

Publish: 2017-02-04 | Modify: 2017-06-24

Google BBR is a TCP acceleration tool, similar to Rui Su, Google has open sourced the BBR congestion control algorithm and submitted it to the Linux kernel. The latest version 4.9 kernel has used this algorithm. Therefore, to use BBR, you must upgrade to the latest kernel.

bbr

View Architecture

OpenVZ virtualization does not support independent kernel upgrades, so it can be directly abandoned. KVM, XEN and other virtualizations are generally supported. CentOS executes the following command to view the current virtualization technology. For detailed instructions, please refer to: CentOS Cloud Hosting/VPS View the Architecture Used

# Install virt-what
yum install virt-what
# View architecture
virt-what

Upgrade Kernel and Enable BBR

Execute the following commands in order to upgrade the kernel and enable BBR. After the execution is complete, restart the server. If the kernel upgrade fails and the system fails to start, you can refer to "CentOS 6 Modify Startup Kernel" for processing. Please back up important data before upgrading and do not test in a production environment.

# Execute the following commands to upgrade the kernel separately
wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh
chmod +x bbr.sh
./bbr.sh

View

# View the kernel version, generally the return value is >=4.9
uname -r
# Execute the following command, generally the return value is net.ipv4.tcp_available_congestion_control = bbr cubic reno
sysctl net.ipv4.tcp_available_congestion_control
# The following command generally returns net.ipv4.tcp_congestion_control = bbr
sysctl net.ipv4.tcp_congestion_control
# The following command generally returns net.core.default_qdisc = fq
sysctl net.core.default_qdisc
# If there is a tcp_bbr module in the return value, it means that BBR has been started
lsmod | grep bbr

Other Instructions

The one-click script has been tested on Vultr and is also applicable to Debian 7+, Ubuntu 12+. Please try it yourself. It works better with another script by Qiu Shuiyi Bing, CentOS One-Click Install Shadowsocks Script.

This article refers to: One-Click Install the Latest Kernel and Enable BBR Script


Comments