CentOS 7 BBR acceleration one-click script

How to use:
Log in as root user and run the following command:

yum install -y wget && wget -N --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && ./bbr.sh


After the installation is completed, the script will prompt you to restart the VPS, enter y and press enter to restart.
After the reboot is completed, go to VPS, verify whether the latest kernel is successfully installed and TCP BBR is enabled, and enter the following check:
No.1

uname -r
If you look at the kernel version, it shows that it is a new version of the kernel, which means that it is OK.
No.2

sysctl net.ipv4.tcp_available_congestion_control
The return value is generally as follows:

net.ipv4.tcp_available_congestion_control = bbr cubic reno
Or:

net.ipv4.tcp_available_congestion_control = reno cubic bbr
No.3

sysctl net.ipv4.tcp_congestion_control
The return value is generally as follows:

net.ipv4.tcp_congestion_control = bbr
No.4

sysctl net.core.default_qdisc
The return value is generally as follows:

net.core.default_qdisc = fq
No.5

lsmod | grep bbr
If the return value is tcp_bbr module, the BBR has been started. Like what:

tcp_bbr 20480 3
Note: Not all VPSs will have this return value, and it is normal if it does not.

Special Instructions
If you're using Google Cloud Platform (GCP) replacement kernels, you'll sometimes experience a situation where the entire disk becomes read-only after a reboot. Just execute the following command to recover:

mount -o remount rw /

Changelog:
May 11, 2021:
1. Changed to install the 5.15.38 kernel under CentOS 7;
2. Reduce the optional kernel versions under Debian and Ubuntu, starting from 5.15 to the end of the latest version.

Was this answer helpful? 3276 Users Found This Useful (0 Votes)