Created
September 16, 2019 08:24
-
-
Save kaichao/db62745c1f0e5862612e27c52ef692b8 to your computer and use it in GitHub Desktop.
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.升级Linux内核达到4.9以上 | |
2.验证BBR是否已经可用。 | |
A. 验证当前TCP控制算法的命令: | |
sysctl net.ipv4.tcp_available_congestion_control | |
返回值一般为: | |
net.ipv4.tcp_available_congestion_control = bbr cubic reno | |
或者为: | |
net.ipv4.tcp_available_congestion_control = reno cubic bbr | |
B. 验证BBR是否已经启动。 | |
sysctl net.ipv4.tcp_congestion_control | |
返回值一般为: | |
net.ipv4.tcp_congestion_control = bbr | |
lsmod | grep bbr | |
返回值有 tcp_bbr 模块即说明 bbr 已启动。注意:并不是所有的 VPS 都会有此返回值,若没有也属正常。 | |
3. 启动BBR。依次执行下面命令就可以了。 | |
sed -i '/net.core.default_qdisc/d' /etc/sysctl.conf | |
sed -i '/net.ipv4.tcp_congestion_control/d' /etc/sysctl.conf | |
echo "net.core.default_qdisc = fq" >> /etc/sysctl.conf | |
echo "net.ipv4.tcp_congestion_control = bbr" >> /etc/sysctl.conf | |
sysctl -p | |
reboot | |
4. 停止BBR。依次执行下面命令就可以了。 | |
sed -i '/net.core.default_qdisc/d' /etc/sysctl.conf | |
sed -i '/net.ipv4.tcp_congestion_control/d' /etc/sysctl.conf | |
sysctl -p | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment