• Welcome to LiuJason's Blog!

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

Coding Projects Jason 5 years ago (2018-11-27) 1445 Views 1 Comments QR code of this page

自从有了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
Like (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
(1)个小伙伴在吐槽
  1. 感谢分享,谢谢站长
    绿软吧(lvr8.com)2020-04-06 12:49 Reply Windows 7 | Chrome 78.0.3904.108