CentOS7 can experience BBR-like unilateral acceleration without changing the kernel.

888u

Last update at :2024-03-09,Edit by888u

In fact, it is KernelPCC. This thing was released by a foreigner a few years ago. The actual effect should not be as good as BBR, but it can also solve certain problems.

For example, CentOS7 installed on some rubbish independent servers of OneProvider cannot change the kernel, and will crash as soon as the kernel is changed. Furthermore, changing the kernel itself is a very risky thing, and there are many VPS cases that cannot be started after changing the kernel.

The modules compiled by KernelPCC can work on the 3.X series of kernels, so CentOS7 can be used without changing the kernel. I tested below on a CentOS7.6X64 machine.

First check the current system kernel version:

uname -r
1 uname -r

This is the latest version of CentOS7.6, remember this will be used later:

3.10.0-957.1.3.el7.x86_64
1 3.10.0-957.1.3.el7.x86_64

Install kernel header files:

yum -y install kernel-headers-$(uname -r) kernel-devel-$(uname -r)
1 yum -y install kernel-headers-$(uname -r) kernel-devel-$(uname -r)

Restart:

reboot
1 reboot

Log in again to install the development kit:

yum -y groupinstall "Development Tools"
1 yum -y groupinstall "Development Tools"

Install CentOS SCL source:

yum -y install centos-release-scl
1 yum -y install centos-release-scl

Install a higher version of GCC:

yum -y install devtoolset-7-gcc*
1 yum -y install devtoolset-7-gcc*

Switch GCC version:

scl enable devtoolset-7 bash
1 scl enable devtoolset-7 bash

Pull project source code:

cd git clone https://github.com/giltu/KernelPCC.git cd KernelPCC
123 cdgit clone https://github.com/giltu/KernelPCC.gitcd KernelPCC

Edit Makefile:

vi Makefile
1 vi Makefile

Change the path to the kernel version number you queried before:

KVERSION := /usr/src/kernels/3.10.0-957.1.3.el7.x86_64
1 KVERSION := /usr/src/kernels/3.10.0-957.1.3.el7.x86_64

Modify location:

Then compile:

make
1 make

If normal, the module can be loaded into the kernel:

insmod tcp_TA.ko
1 insmod tcp_TA.ko

Check whether this module is loaded successfully:

lsmod | grep TA
1 lsmod | grep TA

If something similar to the following is displayed, it means the module is loading normally:

Modify the TCP algorithm to TA:

echo "net.ipv4.tcp_congestion_control=TA" >> /etc/sysctl.conf sysctl-p
12 echo "net.ipv4.tcp_congestion_control=TA" >> /etc/sysctl.confsysctl -p

Check whether it takes effect:

sysctl net.ipv4.tcp_congestion_control
1 sysctl net.ipv4.tcp_congestion_control

If the echo is as shown below, it means the module is working normally:

Start up:

echo "insmod ~/KernelPCC/tcp_TA.ko" >> /etc/rc.d/rc.local chmod +x /etc/rc.d/rc.local
12 echo "insmod ~/KernelPCC/tcp_TA.ko" >> /etc/rc.d/rc.localchmod +x /etc/rc.d/rc.local< /td>

Simple download test:

Download speed without KernelPCC enabled:

Download speed with KernelPCC enabled:

Watching 1080 will be a problem if you don’t enable YouTube, but there will be no pressure to watch 4K after enabling it. All in all, this one is not as stable as BBR.

Recommended site searches: Hong Kong host high defense, Wanwang domain name registration official website, Tianjin server rental, domain name price, independent IP virtual host, virtual host trial for 30 days, national dynamic IP, cheap space, US server, apply for free space,

CentOS7 can experience BBR-like unilateral acceleration without changing the kernel.

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