bbr 相关资料

bbr 相关资料

先确认 vps 到底是什么虚拟化技术

1
systemd-detect-virt

virt-what

1
2
yum install epel remi
yum install virt-what -y
1
apt-get install virt-what -y

kvm 脚本

  • Linux-NetSpeed 千影

支持系统:Centos 6+/Debian 8+/Ubuntu 14+BBR魔改版不支持Debian 7

1
2
3
wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh"   
chmod +x tcp.sh
./tcp.sh
  • 秋水

系统支持:CentOS 6+Debian 7+Ubuntu 12+

1
wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh && chmod +x bbr.sh && ./bbr.sh
  • cx9208

系统支持:CentOS 7

1
wget "https://github.com/cx9208/bbrplus/raw/master/ok_bbrplus_centos.sh" && chmod +x ok_bbrplus_centos.sh && ./ok_bbrplus_centos.sh

查询状态

1
2
3
4
# 显示内核
$ uname -r
# 查找 bbr 模块
$ lsmod | grep bbrplus

手动安装详解

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 下载内核
$ wget https://github.com/cx9208/bbrplus/raw/master/centos7/x86_64/kernel-4.14.90.rpm
# 安装内核
$ yum install -y kernel-4.14.90.rpm
# 切换启动内核
$ grub2-set-default 'CentOS Linux (4.14.90) 7 (Core)'
# 设置 fq
$ echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
$ echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
# 设置 bbrplus
$ echo "net.ipv4.tcp_congestion_control=bbrplus" >> /etc/sysctl.conf
# 重启
$ reboot
# 检查内核版本
$ uname -r
# 检查 bbrplus 是否已经启动
$ lsmod | grep bbrplus

OpenVZ 脚本

Debian or Ubuntu

1
2
3
4
5
6
# 单网卡
$ wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-debianorubuntu.sh
$ bash tcp_nanqinlang-rinetd-debianorubuntu.sh
# 多网卡
$ wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-debianorubuntu-multiNIC.sh
$ bash tcp_nanqinlang-rinetd-debianorubuntu-multiNIC.sh

CentOS 7

1
2
3
4
5
6
# 单网卡
$ wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-centos.sh
$ bash tcp_nanqinlang-rinetd-centos.sh
# 多网卡
$ wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-centos-multiNIC.sh
$ bash tcp_nanqinlang-rinetd-centos-multiNIC.sh