Install and start BBR script with one click

888u

Last update at :2024-05-15,Edit by888u

In 2016, Google open sourced its TCP BBR congestion control algorithm and submitted it to the Linux kernel. The latest version 4.11 kernel has already used this algorithm. According to past tradition, Google always makes the code open source after it is put into use in its own production environment, and this time is no exception. According to field tests, on machines with the latest kernel version deployed and TCP BBR turned on, the network speed can even be improved by several orders of magnitude. So I developed a one-click script to install the latest kernel and enable TCP BBR based on the latest kernels of the three major distributions.

Conditions of use:

  • System support: CentOS 6+, Debian 7+, Ubuntu 12+
  • Virtual technology: KVM, Xen, VMware (Does not support OpenVZ)

Notes:

1. This script has been tested on all VPS on Vultr. 2. When the script detects that the virtual mode of the VPS is OpenVZ, it will prompt an error and automatically exit the installation. 3. If you find that the computer cannot be started after restarting after running the script, open VNC in the VPS backend control panel, the computer will be stuck in grub boot, and you can manually select the kernel. 4. Since the latest version of the system kernel is used, it is best not to install it in a production environment to avoid unpredictable consequences.

How to use:

Log in as root user and run the following command:

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

After the installation is complete, the script will prompt that you need to restart the VPS. Enter y and press Enter to restart. After the restart is complete, enter the VPS to verify whether the latest kernel is successfully installed and TCP BBR is enabled. Enter the following command:

uname -r

Check the kernel version, if it contains 4.11 it means OK

sysctl net.ipv4.tcp_available_congestion_control

The return value is generally: net.ipv4.tcp_available_congestion_control = bbr cubic reno

sysctl net.ipv4.tcp_congestion_control

The return value is generally: net.ipv4.tcp_congestion_control = bbr

sysctl net.core.default_qdisc

The return value is generally: net.core.default_qdisc = fq

lsmod | grep bbr

The return value of the tcp_bbr module means that bbr has been started.


Kernel upgrade method

If it is a CentOS system, execute the following command to upgrade the kernel:

yum --enablerepo=elrepo-kernel -y install kernel-ml kernel-ml-devel

For CentOS 6, execute the command:

sed -i 's/^default=.*/default=0/g' /boot/grub/grub.conf

For CentOS 7, execute the command:

grub2-set-default 0

If it is a Debian/Ubuntu system, you need to manually download the latest version of the kernel to install the upgrade. Go here to download the latest version of the kernel deb installation package. If the system is 64-bit, the linux-image downloaded for amd64 contains the generic deb package; If the system is 32-bit, the linux-image downloaded for i386 contains the generic deb package; The installation command is as follows (taking the latest version of 64-bit 4.9.3 as an example, please replace it with the downloaded deb package):

dpkg -i linux-image-4.9.3-040903-generic_4.9.3-040903.201701120631_amd64.deb

After the installation is complete, execute the command:

/usr/sbin/update-grub

Finally, just restart the VPS.

Source of this script: https://teddysun.com/489.html

Recommended site searches: dynamic IP server, registered password retrieval, domain name price, broadband IP address query, PHP host space national mixed server, domain name information, Hong Kong virtual host space, wordpress host, IP address query,

Install and start BBR script with one click

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码