moowee 大佬有话说 :
centos7安装BBR2后开启cake队列方法
本帖最后由 moowee 于 2020-2-10 22:30 编辑
centos7安装BBR2后开启cake队列方法
如果输入:
tc -s qdisc show
得到类似下面的提示,说明cake没开始成功:
qdisc noqueue 0: dev lo root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc cake 0: dev eth0 root refcnt 2
Sent 7902181984 bytes 6634236 pkt (dropped 11, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc cake 0: dev eth1 root refcnt 2
Sent 1408302 bytes 8511 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
kalagxw大佬提示:
Cake is functional, since tc (iproute >= 4.19.x) supports parameters of the new qdisc.
cake列队依赖iproute 大于4.19.x 现在ubuntu18 centos8 官方源都不能满足需要升级软件包版本。
说明开启cake,需要iproute的版本 >= 4.19.x,centos7.7的iproute版本是iproute-4.11.0-25.el7_7.2.x86_64,
因此显示的都是Unknown qdisc, optlen=140 ,所以升级iproute的版本就可以了:
安装一些依存项:
yum groupinstall "Development Tools"
yum install libselinux-devel elfutils-libelf-devel libmnl-devel glibc* libdb-devel libcap-devel
下载iproute2-4.20.0版本源代码,准备编译,最新的版本是5.5 😛 :
wget https://mirrors.edge.kernel.org/pub/linux/utils/net/iproute2/iproute2-4.20.0.tar.gz && tar -zxf iproute2-4.20.0.tar.gz && cd iproute2-4.20.0
配置,检查依存项:
./configure
显示:
TC schedulers
ATM no
libc has setns: yes
SELinux support: yes
ELF support: yes
libmnl support: yes
Berkeley DB: yes
need for strlcpy: yes
libcap support: yes
除了 TC schedulers ATM 显示 no ,其他都是yes ,我也不知道这个怎么安装!:Q
编译iproute:
make
make编译后提示:
make: Nothing to be done for `all’.
make: Nothing to be done for `all’.
sed "s|@SYSCONFDIR@|/etc/iproute2|g" ip-address.8.in > ip-address.8
sed "s|@SYSCONFDIR@|/etc/iproute2|g" ip-link.8.in > ip-link.8
sed "s|@SYSCONFDIR@|/etc/iproute2|g" ip-route.8.in > ip-route.8
这里的make: Nothing to be done for `all’. ,百度说是文件已经编译过了,会有这个提示。。。
安装iproute:
make install
用 rpm -qa|grep iproute查看还是原来的版本,但是BBR2的cake已经显示正常了。
用命令查看状态:
tc -s qdisc show
显示如下,已经不再是Unknown qdisc了:
qdisc noqueue 0: dev lo root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc cake 0: dev eth0 root refcnt 2 bandwidth unlimited diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms raw overhead 0
Sent 21662084 bytes 30147 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
memory used: 8004b of 15140Kb
capacity estimate: 0bit
min/max network layer size: 42 / 1514
min/max overhead-adjusted size: 42 / 1514
average network hdr offset: 14
BulkBest Effort Voice
thresh 0bit 0bit 0bit
target 5.0ms 5.0ms 5.0ms
interval 100.0ms 100.0ms 100.0ms
pk_delay 0us 35us 49us
av_delay 0us 8us 11us
sp_delay 0us 2us 2us
backlog 0b 0b 0b
pkts 0 29296 851
bytes 0 21572811 89273
way_inds 0 4 0
way_miss 0 783 161
way_cols 0 0 0
drops 0 0 0
marks 0 0 0
ack_drop 0 0 0
sp_flows 0 1 1
bk_flows 0 1 0
un_flows 0 0 0
max_len 0 3291 3028
quantum 1514 1514 1514
qdisc cake 0: dev eth1 root refcnt 2 bandwidth unlimited diffserv3 triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms raw overhead 0
Sent 99170 bytes 595 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
memory used: 2304b of 15140Kb
capacity estimate: 0bit
min/max network layer size: 62 / 342
min/max overhead-adjusted size: 62 / 342
average network hdr offset: 13
BulkBest Effort Voice
thresh 0bit 0bit 0bit
target 5.0ms 5.0ms 5.0ms
interval 100.0ms 100.0ms 100.0ms
pk_delay 0us 54us 43us
av_delay 0us 8us 4us
sp_delay 0us 2us 4us
backlog 0b 0b 0b
pkts 0 400 195
bytes 0 32480 66690
way_inds 0 0 0
way_miss 0 4 1
way_cols 0 0 0
drops 0 0 0
marks 0 0 0
ack_drop 0 0 0
sp_flows 0 0 0
bk_flows 0 0 1
un_flows 0 0 0
max_len 0 90 342
quantum 1514 1514 1514
[email protected] 大佬有话说 :
插矛…
kzklot 大佬有话说 :
有debian 教學?速度上分別大嗎?
蓝瘦香菇 大佬有话说 :
kzklot 大佬有话说 : 2020-2-10 22:29
有debian 教學?速度上分別大嗎?
一键脚本
yc018t
紫薯布丁
moowee 大佬有话说 :
本帖最后由 moowee 于 2020-2-10 22:35 编辑
kzklot 大佬有话说 : 2020-2-10 22:29
有debian 教學?速度上分別大嗎?
看机的线路吧,2台机实测,我觉得比plus好用,即使以前显示的Unknown,现在换成原版的bbr2+cake了。
debian 10 好像满足版本要求吧? 好久没用debian了。
moowee 大佬有话说 :
本帖最后由 moowee 于 2020-2-10 22:40 编辑
蓝瘦香菇 大佬有话说 : 2020-2-10 22:31
一键脚本
紫薯布丁
就是这个BBR2,发现现在的BBR2都是5.4.0-RC6版本,centos会显示unknow 。
5.5的内核,没安装,估计用tc -s qdisc show查看也会是unknow吧,内核又不会去升级iproute。
悟雨 大佬有话说 :
moowee 大佬有话说 : 2020-2-10 22:38
就是这个BBR2,发现现在的BBR2都是5.4.0-RC6版本,centos会显示unknow 。
5.5的内核,没安装,估计用tc…
能编译出高于5.4.0RC6的bbr2一般都是高人了
问题是好像没看到