Centos installed kernel upgrade BBR simple operation!

BBR description:

Google open sourced its TCP BBR congestion control algorithms, and submitted to the Linux kernel, start from 4.9, the Linux kernel has been the use of the algorithm. According to the tradition of the past, Google always first in line to use on their own production environment, the code will be open source, this is no exception.
According to the field test, the deployment of the latest version of the kernel and turn on the TCP BBR machine speed can even upgrade several orders of magnitude.

To install the latest version of the kernel on CentOS, you need to add a ELRepo source.
First, load the public key, let's add ELRepo GPG key:

# rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

As RHEL-6, SL-7, or CentOS-7 Source:

# rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm

Installation fastestmirror

# yum install yum-plugin-fastestmirror

Install the latest version of the kernel

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

The first promoter preferably kernel-ml

# grub2-set-default 0
重启服务器
# reboot

After the restart, -a view by uname kernel whether to switch to the latest version

#   uname -a
Linux ip-172-31-16-70.ap-southeast-1.compute.internal 5.2.0-1.el7.elrepo.x86_64 #1 SMP Mon Jul 8 09:37:45 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux

Add it in the /etc/sysctl.conf configuration

# echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
# echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
保存退出使其生效
# sysctl -p

Perform the following to see whether the kernel bright open TCP BBR

# sysctl net.ipv4.tcp_available_congestion_control
net.ipv4.tcp_available_congestion_control = bbr cubic reno

# sysctl net.ipv4.tcp_congestion_control
net.ipv4.tcp_congestion_control = bbr

If the above information is returned, then turned successful

View tcp_bbr module is loaded:

# lsmod | grep tcp_bbr
tcp_bbr                20480  1

If you want to close the executable:

sed -i '/net\.core\.default_qdisc=fq/d' /etc/sysctl.conf
sed -i '/net\.ipv4\.tcp_congestion_control=bbr/d' /etc/sysctl.conf
sysctl -p

Finished restart can take effect

Reference herein https://www.dahaiwangyang.com/2019-03/technical-note/linux/centos7/tcp-ip/248.html

Guess you like

Origin blog.51cto.com/13481789/2427984