Last active
January 31, 2024 00:45
-
-
Save ComeBey/93103843bcc22e327ea892345cd7beac to your computer and use it in GitHub Desktop.
centos7 bbr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1、yum系统更新 yum update | |
--------------------- | |
2、查看系统版本 | |
cat /etc/redhat-release | |
输出如下则表示已升级到7.5或者更高版本 | |
CentOS Linux release 7.5.1804 (Core) | |
--------------------- | |
3、安装elrepo并升级内核 | |
1. rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org | |
2. rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm | |
3. yum --enablerepo=elrepo-kernel install kernel-ml -y | |
--------------------- | |
正常情况下将输出如下信息: | |
Transaction Summary | |
=================================================================================== | |
Install 1 Package | |
Total download size: 46 M | |
Installed size: 205 M | |
Downloading packages: | |
kernel-ml-4.19.0-1.el7.elrepo.x86_64.rpm | 46 MB 00:00:19 | |
Running transaction check | |
Running transaction test | |
Transaction test succeeded | |
Running transaction | |
Warning: RPMDB altered outside of yum. | |
Installing : kernel-ml-4.19.0-1.el7.elrepo.x86_64 1/1 | |
Verifying : kernel-ml-4.19.0-1.el7.elrepo.x86_64 1/1 | |
Installed: | |
kernel-ml.x86_64 0:4.19.0-1.el7.elrepo | |
Complete! | |
--------------------- | |
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) | |
--------------------- | |
5.把CentOS Linux (4.19.0-1.el7.elrepo.x86_64) 7 (Core)内核设置为默认 | |
输入 grub2-set-default 0 | |
--------------------- --------------------- --------------------- | |
重启 | |
reboot | |
--------------------- | |
4、设置BBR | |
编辑输入 vi /etc/sysctl.conf 然后输入键盘i键提示输入代码 | |
--------------------- | |
复制如下内容ctrl+c 然后carl+v键 在输入shift+:输入wq保存信息 | |
net.core.default_qdisc = fq | |
net.ipv4.tcp_congestion_control = bbr | |
--------------------- | |
加载系统参数(正常情况下会输出我们之前加入的内容) | |
输入 sysctl -p | |
--------------------- --------------------- | |
验证bbr是否已经开启 | |
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或者3等 | |
--------------------- --------------------- --------------------- --------------------- --------------------- | |
为了测试 BBR 的网络性能增强, 您可以在 Web 服务器目录中创建一个文件以供下载, 然后, 从台式计算机上的 Web 浏览器测试下载速度。 | |
sudo yum install httpd -y | |
sudo systemctl start httpd.service | |
sudo firewall-cmd --zone=public --permanent --add-service=http | |
sudo firewall-cmd --reload | |
cd /var/www/html | |
sudo dd if=/dev/zero of=500mb.zip bs=1024k count=500 | |
最后, 从桌面计算机上的 Web 浏览器访问 URL http://[your-server-IP]/500mb.zip , 然后评估执行下载速度。 | |
--------------------- | |
作者:roninkimi | |
来源:CSDN | |
原文:https://blog.csdn.net/qq_43550613/article/details/83512518 | |
版权声明:本文为博主原创文章,转载请附上博文链接! | |
--------------------- --------------------- --------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment