系统环境:阿里云 CentOS6 x86_64

升级内核(内核建议4.12以下):

yum install -y http://ftp.colocall.net/pub/elrepo/archive/kernel/el6/x86_64/RPMS/kernel-ml-4.11.8-1.el6.elrepo.x86_64.rpm
yum remove -y kernel-headers
yum install -y http://ftp.colocall.net/pub/elrepo/archive/kernel/el6/x86_64/RPMS/kernel-ml-headers-4.11.8-1.el6.elrepo.x86_64.rpm
yum install -y http://ftp.colocall.net/pub/elrepo/archive/kernel/el6/x86_64/RPMS/kernel-ml-devel-4.11.8-1.el6.elrepo.x86_64.rpm

设置引导:

vi /etc/grub.conf

如果上述步骤没错,将default=1改为default=0

编译安装:

yum install -y make gcc
wget -O ./tcp_tsunami.c https://gist.github.com/anonymous/ba338038e799eafbba173215153a7f3a/raw/55ff1e45c97b46f12261e07ca07633a9922ad55d/tcp_tsunami.c
echo "obj-m:=tcp_tsunami.o" > Makefile
make -C /lib/modules/$(uname -r)/build M=`pwd` modules CC=/usr/bin/gcc
chmod +x ./tcp_tsunami.ko
cp -rf ./tcp_tsunami.ko /lib/modules/$(uname -r)/kernel/net/ipv4
insmod tcp_tsunami.ko
depmod -a
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=tsunami" >> /etc/sysctl.conf

然后重启:

reboot

重启成功后,执行以下命令。如果有显示内容说明启动成功。

lsmod | grep tsunami

注:文章大部分内容来自 http://51.ruyo.net/p/4415.html,本文只修改了内核地址。