1. 更换内核
*安装时出现another app is currently holding the yum lock;waiting for it to exit...
这是yum已经在进程使用,通过rm -f /var/run/yum.pid强制关闭yum进程
1
2
3
|
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
|
2. 查看内核是否安装成功
1
|
rpm
-
qa
|
grep
kernel
|
正常会如下所示:
1
2
3
4
5
6
7
|
[
root
@
centos
-
512mb
-
sfo1
-
01
~
]
# rpm -qa | grep kernel
kernel
-
firmware
-
2.6.32
-
642.11.1.el6.noarch
kernel
-
headers
-
2.6.32
-
642.11.1.el6.x86_64
dracut
-
kernel
-
004
-
409.el6_8.2.noarch
kernel
-
2.6.32
-
642.11.1.el6.x86_64
kernel
-
devel
-
2.6.32
-
642.11.1.el6.x86_64
kernel
-
ml
-
4.9.0
-
1.el6.elrepo.x86_64
#这就是我们安装的新内核
|
3. 更新 grub 系统引导文件并重启
1
2
3
|
egrep
^
menuentry
/
etc
/
grub2
.
cfg
|
cut
-
f
2
-
d
\'
grub2
-
set
-
default
0
#default 0表示第一个内核设置为默认运行, 选择最新内核就对了
reboot
|
开启TCP-BBR
1、先查看下内核是否更换为4.9
1
|
uname
-
r
|
2、生效BBR
1
2
3
|
echo
"net.core.default_qdisc=fq"
>>
/
etc
/
sysctl
.
conf
echo
"net.ipv4.tcp_congestion_control=bbr"
>>
/
etc
/
sysctl
.
conf
sysctl
-
p
|
3、检测是否完全生效
sysctl net.ipv4.tcp_available_congestion_control
正常情况会如下显示:
1
2
|
[
root
@
centos
-
512mb
-
sfo1
-
01
~
]
# sysctl net.ipv4.tcp_available_congestion_control
net
.
ipv4
.
tcp_available_congestion_control
=
bbr
cubic
reno
|
接着
1
2
|
sysctl
-
n
net
.
ipv4
.
tcp_congestion_control
lsmod
|
grep
bbr
|
正常情况是这样的:
1
2
3
4
|
[
root
@
centos
-
512mb
-
sfo1
-
01
~
]
# sysctl -n net.ipv4.tcp_congestion_control
bbr
[
root
@
centos
-
512mb
-
sfo1
-
01
~
]
# lsmod | grep bbr
tcp
_bbr
20480
55
|
这样我们就已经为我们的VPS部署好了谷歌Google的 TCP-BBR 协议,