通過這篇教程攻略,無論我們是新手還是老手,無論我們是處于哪個地區,都可以參考。使用BBR,可以極大得提升VPS傳輸速率。
Tip: 我們需要一臺KVM架構VPS服務器,并具備root管理權限
這里以Centos7為例,直接使用Elrepo編譯好的內核進行安裝,先更新系統。
yum update -y
安裝內核
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm yum --enablerepo=elrepo-kernel install kernel-ml
安裝完成后使用下面命令查看當前已安裝的內核
awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
出現類似返回
[root@VM_91_140_centos ~]# awk -F\' '$1=="menuentry " {print i++ " : " $2}' /etc/grub2.cfg
0 : CentOS Linux (4.19.0-1.el7.elrepo.x86_64) 7 (Core)
1 : CentOS Linux (3.10.0-514.2.2.el7.x86_64) 7 (Core)
2 : CentOS Linux (3.10.0-327.36.3.el7.x86_64) 7 (Core)
3 : CentOS Linux (3.10.0-327.28.2.el7.x86_64) 7 (Core)
4 : CentOS Linux (3.10.0-327.10.1.el7.x86_64) 7 (Core)
5 : CentOS Linux, with Linux 3.10.0-123.el7.x86_64
6 : CentOS Linux, with Linux 0-rescue-3f57f163dfaf1ec9ed891518d1d2fafe
把CentOS Linux (4.19.0-1.el7.elrepo.x86_64)內核設置為默認
grub2-set-default 0
重啟
reboot
編輯/etc/sysctl.conf,加入或修改這兩行
net.core.default_qdisc = fq net.ipv4.tcp_congestion_control = bbr
保存后,輸入此命令使之生效!
sysctl -p
最后檢查BBR是否運行,有輸出結果說明正常
lsmod | grep bbr
相比較銳速,BBR占用內存更小同時對網絡負載也更加友好,推薦使用。

原版BBR并不會主動搶占帶寬,現有大佬開發出修改版BBR,在犧牲一些服務器性能情況下進一步改善TCP傳輸速率。關于BBR方面的配置疑問,歡迎與我討論