本文主要介绍 qperf
的安装、使用。qperf
主要是测试网络带宽(bandwidth
)和延迟(latency
)的工具
安装
yum install qperf
help
$ qperf --help examples
In these examples, we first run qperf on a node called myserver in server
mode by invoking it with no arguments. In all the subsequent examples, we
run qperf on another node and connect to the server which we assume has a
hostname of myserver.
* To run a TCP bandwidth and latency test:
qperf myserver tcp_bw tcp_lat
* To run a UDP latency test and then cause the server to terminate:
qperf myserver udp_lat quit
* To measure the RDMA UD latency and bandwidth:
qperf myserver ud_lat ud_bw
* To measure RDMA UC bi-directional bandwidth:
qperf myserver rc_bi_bw
* To get a range of TCP latencies with a message size from 1 to 64K
qperf myserver -oo msg_size:1:64K:*2 -vu tcp_lat
使用
服务器端
$ qperf &
客户端
$ qperf <server ip> -t 60 -vu tcp_bw tcp_lat udp_lat
说明:
- -t:测试持续时长,单位秒
- -vu:显示使用参数的信息
- tcp_bw:tcp 带宽
- tcp_lat:tcp 时延
- udp_lat:udp 时延