Google BBR 是一款免費開源的TCP擁塞控制傳輸控制協(xié)議, 可以使 Linux 服務(wù)器顯著提高吞吐量和減少 TCP 連接的延遲。 項目地址:https://github.com/google/bbr
1、yum系統(tǒng)更新
yum update
2、查看系統(tǒng)版本
cat /etc/redhat-release
輸出如下則表示已升級到7.6
CentOS Linux release 7.6.1810 (Core)
3、安裝elrepo并升級內(nèi)核
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 -y
4、安裝完成后使用下面命令查看當(dāng)前已安裝的內(nèi)核
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 7 Rescue ee7953a3b5944053a26f29daf8c71e2f (3.10.0-862.14.4.el7.x86_64) 2 : CentOS Linux (3.10.0-862.14.4.el7.x86_64) 7 (Core) 3 : CentOS Linux (3.10.0-862.3.2.el7.x86_64) 7 (Core) 4 : CentOS Linux (3.10.0-862.el7.x86_64) 7 (Core) 5 : CentOS Linux (0-rescue-4bbda2095d924b72b05507b68bd509f0) 7 (Core)
5、把CentOS Linux (4.19.0-1.el7.elrepo.x86_64) 7 (Core)內(nèi)核設(shè)置為默認(rèn)
grub2-set-default 0
6、重啟服務(wù)器
reboot
1、編輯配置文件
vi /etc/sysctl.conf
2、添加如下內(nèi)容
net.core.default_qdisc = fq net.ipv4.tcp_congestion_control = bbr
3、加載系統(tǒng)參數(shù)(正常情況下會輸出我們之前加入的內(nèi)容)
sysctl -p
1、輸入
sysctl net.ipv4.tcp_available_congestion_control
如果返回
net.ipv4.tcp_available_congestion_control = reno cubic bbr
則安裝?成功
2、輸入
lsmod | grep bbr
如果返回
tcp_bbr 20480 2
則安裝成功
]]>