安裝Google BBR加速
一.簡介
Google BBR 是一款免費開源的TCP擁塞控制傳輸控制協議, 可以使Linux伺服器顯著提高吞吐量和減少TCP連線的延遲。
二.安裝
1.yum系統更新
yum update
2.檢視系統版本
cat /etc/redhat-release
3.安裝elrepo並升級核心
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.安裝完成後使用下面命令檢視當前已安裝的核心
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)
檢視當前default的entry
grub2-editenv list
把CentOS Linux (4.19.0-1.el7.elrepo.x86_64) 7 (Core)核心設定為預設,0是第幾號的意思
grub2-set-default 0
5.重啟伺服器
reboot
三.設定BBR
1.編輯配置檔案,新增內容
vi /etc/sysctl.conf
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
2.載入系統引數(正常情況下會輸出我們之前加入的內容)
sysctl -p
3.驗證bbr是否已經開啟
輸入
sysctl net.ipv4.tcp_available_congestion_control
返回如下是成功
net.ipv4.tcp_available_congestion_control = reno cubic bbr
輸入
lsmod | grep bbr
返回如下成功
tcp_bbr 20480 2