How to enable native Google BBR on CentOS 7 / Debian 9 to achieve TCP acceleration

How to enable native Google BBR on CentOS 7 / Debian 9 to achieve TCP acceleration

New kernels such as CentOS 7/Debian 9 come with BBR, which can be enabled directly and is safe.

1. CentOS 7 enables native Google BBR

1. Update the CentOS 7 kernel to support BBR

1. Check the Centos kernel

 uname -r

2. If it is lower than 4.10, update the kernel

 rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum --enablerepo=elrepo-kernel install kernel-ml -y

3. After the installation is complete, check the installed kernel:

 rpm -qa | grep kernel

If you see kernel-ml-5.3.5-1.el7.elrepo.x86_64, it is successful.
4. Update startup

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

You will see something like this

 CentOS Linux (5.3.5-1.el7.elrepo.x86_64) 7 (Core)
CentOS Linux (3.10.0-957.1.3.el7.x86_64) 7 (Core)
CentOS Linux (0-rescue-96820b9851c24560b5f942f2496b9aeb) 7 (Core)

Set CentOS Linux (5.3.5-1.el7.elrepo.x86_64) 7 (Core) as the first boot order (because the boot starts from 0)

 grub2-set-default 0

5. Restart the system

 reboot

(II) Enabling BBR in CentOS 7

1. Execution

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

2. Check whether BBR is enabled in the kernel

 sysctl net.ipv4.tcp_available_congestion_control

and

 lsmod | grep bbr

If the word BBR is displayed, it means that BBR is enabled successfully.

2. Debian 9 enables native Google BBR

1. Modify system variables

 echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf

2. Save and take effect

 sysctl -p

3. Check whether BBR is enabled in the kernel

 sysctl net.ipv4.tcp_available_congestion_control

The following content is displayed to indicate that it is enabled:

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

4. BBR should have been started through the above operations. Then check whether BBR is started.

 lsmod | grep bbr

The following is displayed, indicating successful startup:

 lsmod | grep bbr tcp_bbr 20480 14

<<:  Flynet: A TCP/UDP tool that supports intranet penetration and port forwarding

>>:  DMIT: CN2 GIA VPS in Los Angeles, 30Mbps-1Gbps bandwidth, minimum annual payment of US$71; 10% or 20% discount for half-year payment or above

Recommend

serverhub free 1G space

ServerHub is a hosting provider founded in 2002, ...

TragicServers: $2.99/month/1GB memory/20GB space/1TB traffic/KVM/Los Angeles

TragicServers, a personal hosting provider. Sever...

INCLOUDIBLY: €2.73/month/512 MB/20 GB space/1 TB traffic/1 IP/Xen

INCLOUDIBLY is a Swiss hosting company that has b...

KrakenServers: $10/year/1GB memory/25GB space/1TB bandwidth/KVM/Dallas

KrakenServers, an American hosting provider, was ...

CloudCone: $1.67/month/256MB memory/5GB SSD space/3TB traffic/KVM/Los Angeles

CloudCone seems to be a newly established hosting...

V.PS 2 cores 1GB memory 1Gbps port Hong Kong CMI KVM VPS review

Details : V.PS: €4.17/month/2 cores/1GB RAM/20GB ...

VMJam: 3 yuan/month/256MB memory/3GB SSD space/200GB traffic/NAT/KVM/Seattle

VMJam, a Chinese merchant, currently only provide...