On CentOS 7, how does one deploy Google BBR [handling, turning over] And centosbbr?

Source: Internet
Author: User

On CentOS 7, how does one deploy Google BBR [handling, turning over] And centosbbr?

How to deploy Google BBR on CentOS 7

This article carries from https://www.vultr.com/docs/how-to-deploy-google-bbr-on-centos-7

[Note: The kernel version used at the time of this article is 4.9.0 and is 4.15.6 at present (version 4.15 is higher than version 4.9 )]

 

 

Step 1: Use the Elrepo RPM repository to upgrade the kernel

To use BBR, You need to upgrade the kernel of CentOS 7 to 4.9.0 or above. You can use the Elrepo RPM repository to perform this operation easily.

Before upgrading, you can view the current kernel:

uname -r

This command should output a string, similar:

3.10.0-514.2. 2. El7 x86_64


As you can see, the current kernel is 3.10.0.

Install ELRepo repo:

sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.orgsudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm

Use ELRepo repo to install the 4.9.0 kernel: [4.15.6 is currently installed]

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

Confirmation result:

rpm -qa | grep kernel

If the installation is successful, you should see the kernel-ml-4.9.0-1.el7.elrepo.x86_64 in the output list

kernel-ml-4.9.0-1.el7.elrepo.x86_64kernel-3.10.0-514.el7.x86_64kernel-tools-libs-3.10.0-514.2.2.el7.x86_64kernel-tools-3.10.0-514.2.2.el7.x86_64kernel-3.10.0-514.2.2.el7.x86_64

[Do not see OK]


Now, you need to enable the 4.9.0 kernel by setting the default GRUB2 boot item.

Show all entries in the Grub2 menu:

sudo egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \'

The result should be similar:

CentOS Linux 7 Rescue a0cbf86a6ef1416a8812657bb4f2b860 (4.9.0-1.el7.elrepo.x86_64)CentOS Linux (4.9.0-1.el7.elrepo.x86_64) 7 (Core)CentOS Linux (3.10.0-514.2.2.el7.x86_64) 7 (Core)CentOS Linux (3.10.0-514.el7.x86_64) 7 (Core)CentOS Linux (0-rescue-bf94f46c6bd04792a6a42c91bae645f7) 7 (Core)


Because the row count starts from 0 and the 4.9.0 kernel item is located on the second line, the default startup Item is set to 1:

sudo grub2-set-default 1

 

 Note: The result is different from the example.

CentOS Linux (4.15.6-1. el7.elrepo. x86_64) 7 (Core)

  CentOS Linux 7 Rescue 186e68c8657e4bfc8df5044d08b50231 (3.10.0-693.17.1.el7.x86 _ 64)

CentOS Linux (3.10.0-693.17.1.el7.x86 _ 64) 7 (Core)
CentOS Linux (3.10.0-693.11.6.el7.x86 _ 64) 7 (Core)
CentOS Linux (3.10.0-693. el7.x86 _ 64) 7 (Core)
CentOS Linux (0-rescue-c73a5ccf3b8145c3a675b64c4c3ab1d4) 7 (Core)

  At this timeCentOS Linux (4.15.6-1. el7.elrepo. x86_64) 7 (Core)Located in the first entry, so what I entered should be

  

  sudo grub2-set-default 0

 

Restart the system:

sudo shutdown -r now


When the server is online again, log on again and run the uname command again to confirm that you are using the correct kernel:

uname -r


You should see the following results:

4.9.0-1.el7.elrepo.x86_64

(Now it should be)

4.15.6-1.el7.elrepo.x86_64

 

 

 

Step 2: Enable BBR

To enable the BBR algorithm, you must modify the Sysctl configuration as follows:

echo 'net.core.default_qdisc=fq' | sudo tee -a /etc/sysctl.confecho 'net.ipv4.tcp_congestion_control=bbr' | sudo tee -a /etc/sysctl.confsudo sysctl -p

Now, you can use the following command to confirm that BBR is Enabled:

sudo sysctl net.ipv4.tcp_available_congestion_control

The output should be similar:

net.ipv4.tcp_available_congestion_control = bbr cubic reno

Next, verify:

sudo sysctl -n net.ipv4.tcp_congestion_control

The output should be:

bbr


Finally, check whether the kernel module is loaded:

lsmod | grep bbr

The output will be similar:

tcp_bbr 16384 0

 

 


Step 3 (optional): test network performance enhancement

To test the BBR network performance enhancement, you can create a file in the Web Server Directory for download, and then test the download speed from the Web browser on the desktop computer.

sudo yum install httpd -ysudo systemctl start httpd.servicesudo firewall-cmd --zone=public --permanent --add-service=httpsudo firewall-cmd --reloadcd /var/www/htmlsudo dd if=/dev/zero of=500mb.zip bs=1024k count=500

Finally, access the URL http: // [your-server-IP]/500mb.zip from the Web browser on the desktop computer, and evaluate the download speed.

Above. Thank you for reading.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.