qperf 安装 客户端和服务端yum install qperf
[Could not resolve host: mirrors.rockylinux.org]
[root@]# rpm -ivh qperf-0.4.11-2.el8.x86_64.rpm
warning: qperf-0.4.11-2.el8.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 6d745a60: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
file /usr/bin/qperf from install of qperf-0.4.11-2.el8.x86_64 conflicts with file from package qperf-0.4.9-3.el7.x86_64
file /usr/share/man/man1/qperf.1.gz from install of qperf-0.4.11-2.el8.x86_64 conflicts with file from package qperf-0.4.9-3.el7.x86_64
[root@~]# qperf
服务端开启
[root@ ~]# qperf
客户端使用
#测试带宽
[root@ ~]# qperf -t 60 --use_bits_per_sec 10.23.11.46 tcp_bw
tcp_bw:
bw = 925 Mb/sec
#测试延时
[root@ ~]# qperf -t 60 --use_bits_per_sec 10.23.11.46 tcp_lac
tcp_lac: bad test; try: qperf --help tests
[root@ ~]# qperf -t 60 --use_bits_per_sec 10.23.11.46 tcp_lat
tcp_lat:
latency = 27.2 us
#带宽延时一块测试
[root@ ~]# qperf -t 60 --use_bits_per_sec 10.23.11.46 tcp_lat tcp_bw
tcp_lat:
latency = 25.6 us
tcp_bw:
bw = 925 Mb/sec
#:可循环遍历测试,每次增加测试字节大小,从4K开始,以2的幂递增,直到128K结束,这样可以一次性拿到不同字节大小的带宽及延迟指标
[root@1 ~]# qperf 10.23.11.46 -oo msg_size:4k:128k:*2 -vu tcp_bw tcp_lat
tcp_bw:
bw = 116 MB/sec
msg_size = 4 KB
tcp_bw:
bw = 116 MB/sec
msg_size = 8 KB
tcp_bw:
bw = 116 MB/sec
msg_size = 16 KB
tcp_bw:
bw = 114 MB/sec
msg_size = 32 KB
tcp_bw:
bw = 116 MB/sec
msg_size = 64 KB
tcp_bw:
bw = 115 MB/sec
msg_size = 125 KiB (128,000)
tcp_lat:
latency = 192 us
msg_size = 4 KB
tcp_lat:
latency = 209 us
msg_size = 8 KB
tcp_lat:
latency = 227 us
msg_size = 16 KB
tcp_lat:
latency = 410 us
msg_size = 32 KB
tcp_lat:
latency = 743 us
msg_size = 64 KB
tcp_lat:
latency = 1.31 ms
msg_size = 125 KiB (128,000)