Google open sourced their optimized network congestion algorithm BBR in September 2016, which has been integrated in the latest version of the Linux kernel (4.9-rc8).
Not everyone is familiar with TCP unilateral acceleration, but there is another well-known commercial software "Rush", I believe many people know it. Especially for people who use foreign servers or VPS, the effect is better.
There are many tutorials on the Internet about enabling BBR under Debian and Ubuntu systems, so I won’t paste them. I have been using CentOS myself. This article introduces how to enable BBR under 64-bit CentOS 7 systems.
The first step is to upgrade the kernel to a version that supports BBR:
# Import public key
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
# Install elrepo source
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
# Install elrepo source
rpm -Uvh http://www.elrepo.org/elrepo-release-6-6.el6.elrepo.noarch.rpm
# Installation 4.9.0+ kernel
yum --enablerepo=elrepo-kernel install kernel-ml -y
# Confirm whether the new kernel is successfully installed
rpm -qa | grep kernel
If the installation is successful, you should see an entry like kernel-ml-4.*.*-*.el7.elrepo.x86_64:
kernel-tools-3.10.0-514.el7.x86_64
kernel-ml-4.12.4-1.el7.elrepo.x86_64
kernel-tools-libs-3.10.0-514.el7.x86_64
kernel-3.10.0-514.el7.x86_64
After installing the new version of the kernel, first use the newly installed kernel to boot the system to see if it can start normally. Here are the commands to directly adjust the GRUB2 boot sequence:
# View available startup items
egrep ^menuentry /etc/grub2.cfg | cut -f 2-d \'
After executing this command, you can see multiple bootable systems, such as mine:
CentOS Linux(4.12.4-1.el7.elrepo.x86_64)7(Core)
CentOS Linux(3.10.0-514.el7.x86_64)7(Core)
CentOS Linux(0-rescue-d4d0adfea8e944e5b8019ed1aa3c9e16)7(Core)
No matter how many, from top to bottom, remember the number of the item to be booted (counting from 0). For example, in the above example, I will use the first item CentOS Linux (4.12.4-1.el7. elrepo.x86_64) 7 (Core) to boot, the serial number is 0.
# Set the default boot entry
grub2-set-default0
# Restart the system
reboot
After restarting the system, we can see that our kernel is already a new version through uname -r or other commands, and then turn on BBR
echo "net.core.default_qdisc=fq">>/etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr">>/etc/sysctl.conf
# load/etc/sysctl.The parameters in the conf file are displayed, mainly to see if there is an error setting (the displayed result is related to the content of your configuration file)
sysctl -p
# Verify that bbr is turned on, if successful, you should see net.ipv4.tcp_congestion_control = bbr
sysctl net.ipv4.tcp_available_congestion_control
# It is still verification. If successful, you should see something like tcp_bbr 163843 such text
lsmod | grep bbr
Each of the above steps is best to carefully check whether it is smooth according to the instructions in the comments, and then proceed to the next step. If all are successful, the BBR algorithm has been successfully started here. You can put a large file on your server and download it with a browser to see if the speed has improved.
After my Los Angeles VPS was accelerated, the download speed with Chrome increased from about 500K/s to about 3.3M/s.