Linux升级内核 开启TCP BBR协议 加速VPS

自从有了TCP_BBR之后某些特殊服务的效率高了很多,速度也很快啊,油管4K超清都可以随便看了,这里推荐一下某服务(>点我<),靠谱哦!

开启BBR有一个很重要的要求,就是内核kernel版本要大于4.9,KVM的话可以自己升级内核,至于那些内核小于4.9的OpenVZ(OVZ)机器就只能走其他途径了,具体请看我这篇文章:(挖坑)

以下操作前提:KVM构架
首先安装elrepo源,然后从源内安装最新的kernel

rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm

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

之后查看目前kernel的情况以及排序,然后设置最新的kernel为默认内核

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

grub2-set-default 0

重启之后生效

reboot

然后开启BBR协议

echo 'net.core.default_qdisc=fq' | tee -a /etc/sysctl.conf

echo 'net.ipv4.tcp_congestion_control=bbr' | tee -a /etc/sysctl.conf

sysctl -p

大功告成!


This article is under CC BY-NC-SA 4.0 license.
Please quote the original link:https://www.liujason.com/article/122.html
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy