在centos7 部署bbr
How to Deploy Google BBR on CentOS 7
BBR (Bottleneck Bandwidth and RTT) is a new congestion control algorithm which is contributed to the Linux kernel TCP stack by Google. With BBR in place, a Linux server can get significantly increased throughput and reduced latency for connections. Besides, it's easy to deploy BBR because this algorithm requires only updates on the sender side, not in the network or on the receiver side.
In this article, I will show you how to deploy BBR on a Vultr CentOS 7 KVM server instance.
Prerequisites
- A Vultr CentOS 7 x64 server instance.
- A sudo user.
Step 1: Upgrade the kernel using the ELRepo RPM repository
In order to use BBR, you need to upgrade the kernel of your CentOS 7 machine to 4.9.0. You can easily get that done using the ELRepo RPM repository.
Before the upgrade, you can take a look at the current kernel:
uname -r
This command should output a string which resembles:
3.10.0-514.2.2.el7.x86_64
As you see, the current kernel is 3.10.0.
Install the ELRepo repo:
sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
Install the 4.9.0 kernel using the ELRepo repo:
sudo yum --enablerepo=elrepo-kernel install kernel-ml -y
Confirm the result:
rpm -qa | grep kernel
If the installation is successful, you should see kernel-ml-4.9.0-1.el7.elrepo.x86_64
among the output list:
kernel-ml-4.9.0-1.el7.elrepo.x86_64
kernel-3.10.0-514.el7.x86_64
kernel-tools-libs-3.10.0-514.2.2.el7.x86_64
kernel-tools-3.10.0-514.2.2.el7.x86_64
kernel-3.10.0-514.2.2.el7.x86_64
Now, you need to enable the 4.9.0 kernel by setting up the default grub2 boot entry.
Show all entries in the grub2 menu:
sudo egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \'
The result should resemble:
CentOS Linux 7 Rescue a0cbf86a6ef1416a8812657bb4f2b860 (4.9.0-1.el7.elrepo.x86_64)
CentOS Linux (4.9.0-1.el7.elrepo.x86_64) 7 (Core)
CentOS Linux (3.10.0-514.2.2.el7.x86_64) 7 (Core)
CentOS Linux (3.10.0-514.el7.x86_64) 7 (Core)
CentOS Linux (0-rescue-bf94f46c6bd04792a6a42c91bae645f7) 7 (Core)
Since the line count starts at 0
and the 4.9.0 kernel entry is on the first line, set the default boot entry as 0
:
sudo grub2-set-default 0
Reboot the system:
sudo shutdown -r now
When the server is back online, log back in and rerun the uname command to confirm that you are using the correct Kernel:
uname -r
You should see the result as below:
4.9.0-1.el7.elrepo.x86_64
Step 2: Enable BBR
In order to enable the BBR algorithm, you need to modify the sysctl
configuration as follows:
echo 'net.core.default_qdisc=fq' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv4.tcp_congestion_control=bbr' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
Now, you can use the following commands to confirm that BBR is enabled:
sudo sysctl net.ipv4.tcp_available_congestion_control
The output should resemble:
net.ipv4.tcp_available_congestion_control = bbr cubic reno
Next, verify with:
sudo sysctl -n net.ipv4.tcp_congestion_control
The output should be:
bbr
Finally, check that the kernel module was loaded:
lsmod | grep bbr
The output will be similar to:
tcp_bbr 16384 0
Step 3 (optional): Test the network performance enhancement
In order to test BBR's network performance enhancement, you can create a file in the web server directory for download, and then test the download speed from a web browser on your desktop machine.
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
Finally, visit the URL http://[your-server-IP]/500mb.zip
from a web browser on your desktop computer, and then evaluate download speed.
That's all. Thank you for reading.
在centos7 部署bbr的更多相关文章
- [原]CentOS7部署osm2pgsql
转载请注明原作者(think8848)和出处(http://think8848.cnblogs.com) 部署Postgresql和部署PostGis请参考前两篇文章 本文主要参考GitHub上osm ...
- centos7 部署ssserver
centos7 部署shadowsocks服务端 为什么要选centos7? 以后centos7 肯定是主流,在不重要的环境还是尽量使用新系统吧 centos7 的坑 默认可能会有firewall 或 ...
- centos7安装bbr
centos7安装bbr 安装 sudo wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.s ...
- centos7 部署 docker compose
=============================================== 2019/4/10_第1次修改 ccb_warlock == ...
- centos7 部署 docker ce
=============================================== 2019/4/9_第1次修改 ccb_warlock === ...
- centos7 部署 open-falcon 0.2.0
=============================================== 2019/4/29_第3次修改 ccb_warlock 更新 ...
- centos7 部署 docker、shipyard
=============================================== 2019/4/9_第3次修改 ccb_warlock 更新说 ...
- centos7 部署 docker swarm
=============================================== 2019/4/9_第3次修改 ccb_warlock 更新说 ...
- CentOS7部署Nginx
CentOS7部署Nginx 1.准备工作 Nginx的安装依赖于以下三个包,意思就是在安装Nginx之前首先必须安装一下的三个包,注意安装顺序如下: 1 SSL功能需要openssl库,直接通过yu ...
随机推荐
- JavaScript数组方法--pop、shift、unshift
其实还有一个方法push,应该放在一起说的,问题是他跟concat跑了,那只剩下这哥仨了. pop:pop()方法从数组中删除最后一个元素,并返回该元素的值.此方法更改数组的长度.捎带一下push,p ...
- gradle指定相应JDK编译
转载请注明出处: http://blog.csdn.net/sanyinchen/article/details/50901582 问题描述: 电脑中装有多个jdk版本,可能默认的jdk是1.6,但是 ...
- Java 转JSON串
一.JSON (JavaScript Object Notation) 1.轻量级数据交换格式能够替代XML的工作 2.数据格式比较简单, 易于读写, 格式都是压缩的, 占用带宽小(简洁.简单.体积小 ...
- windows文件名格式的中文+数字混合字符串排序
记录一下 [DllImport("shlwapi.dll", CharSet = CharSet.Unicode)] private static extern int StrCm ...
- selenium2 webdriver 常用的python 函数
新建实例driver = webdriver.Chrome() 1.通过标签属性Id查找元素 方法:find_element_by_id(element_id) 实例:driver.find_elem ...
- [SQL][MS SQL]ID自增列从1开始重新排序
数据库中把ID自增长重置成1: 一般做法:(太麻烦) 复制表数据->删除原表.新建一张表->粘贴: 新方法: 数据库中:新建查询->复制.粘贴一下代码->修改表名,执行即可(先 ...
- Android Jetpack 组建介绍(二)——Lifecycler
参考Android Jetpack架构组件之 Lifecycle(源码篇) 源码分析 关于Lifecycle的使用考上一篇文章Android Jetpack框架之 Lifecycles(使用篇),从使 ...
- 深入理解Java虚拟机读书笔记5----虚拟机字节码执行引擎
五 虚拟机字节码执行引擎 1 运行时栈帧结构 ---栈帧是用于支持虚拟机进行方法调用和方法执行的数据结构,是虚拟机运行时数据区中的虚拟机栈的栈元素. ---栈帧中存储了方法的局部变 ...
- Xilinx Zynq ZC-702 开发(02)—— 通过 Xilinx SDK 调试 Linux 应用
远程调试环境由 PC 上运行的 System Debugger(集成在 Xilinx SDK 中) 和 Zynq 板上运行的 Linux TCF Agent 共同构成, 两者通过 TCP 连接,架构图 ...
- 超详细的遗传算法(Genetic Algorithm)解析
https://blog.csdn.net/u010451580/article/details/51178225 https://www.jianshu.com/p/c82f09adee8f 00 ...