Ubuntu升级内核

下载内核

内核:http://kernel.ubuntu.com/~kernel-ppa/mainline/

安装最新的4.12.0,然后重启

wget -c http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.12/linux-headers-4.12.0-041200_4.12.0-041200.201707022031_all.deb
wget -c http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.12/linux-headers-4.12.0-041200-generic_4.12.0-041200.201707022031_amd64.deb
wget -c http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.12/linux-image-4.12.0-041200-generic_4.12.0-041200.201707022031_amd64.deb
sudo dpkg -i *.deb
reboot

然后查看

root@aliyun:/home/fangwenjun# uname -ar
Linux aliyun 4.12.0-041200-generic #201707022031 SMP Mon Jul 3 00:32:52 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

开启bbr

开机后 uname -r 看看是不是内核4.9、4.10或4.11

执行 lsmod | grep bbr,如果结果中没有 tcp_bbr 的话就先执行

modprobe tcp_bbr
echo "tcp_bbr" >> /etc/modules-load.d/modules.conf

执行

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

保存生效

sysctl -p

执行

sysctl net.ipv4.tcp_available_congestion_control
sysctl net.ipv4.tcp_congestion_control

如果结果都有bbr, 则证明你的内核已开启bbr

看到有 tcp_bbr 模块即说明bbr已启动