1. rhel6发行版里面自带了qperf 工具,使用rhel6 光盘安装qperf

[root@mysqlnode2 ~]#yum install qperf

2. 采用是Client/Server的模式进行测试

3. 开始测试延迟和带宽
1) 查看帮助

[root@mysqlnode2 ~]#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 SDP bandwidth test for 10 seconds:
qperf myserver -t 10 sdp_bw
* 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

如果想知道详细的使用参数运行下面命令:

[root@mysqlnode2 ~]# qperf –help tests
Miscellaneous
conf Show configuration
quit Cause the server to quit
Socket Based
rds_bw RDS streaming one way bandwidth
rds_lat RDS one way latency
sctp_bw SCTP streaming one way bandwidth
sctp_lat SCTP one way latency
sdp_bw SDP streaming one way bandwidth
sdp_lat SDP one way latency
tcp_bw TCP streaming one way bandwidth
tcp_lat TCP one way latency
udp_bw UDP streaming one way bandwidth
udp_lat UDP one way latency
RDMA Send/Receive
rc_bi_bw RC streaming two way bandwidth
rc_bw RC streaming one way bandwidth
rc_lat RC one way latency
uc_bi_bw UC streaming two way bandwidth
uc_bw UC streaming one way bandwidth
uc_lat UC one way latency
ud_bi_bw UD streaming two way bandwidth
ud_bw UD streaming one way bandwidth
ud_lat UD one way latency
RDMA
rc_rdma_read_bw RC RDMA read streaming one way bandwidth
rc_rdma_read_lat RC RDMA read one way latency
rc_rdma_write_bw RC RDMA write streaming one way bandwidth
rc_rdma_write_lat RC RDMA write one way latency
rc_rdma_write_poll_lat RC RDMA write one way polling latency
uc_rdma_write_bw UC RDMA write streaming one way bandwidth
uc_rdma_write_lat UC RDMA write one way latency
uc_rdma_write_poll_lat UC RDMA write one way polling latency
InfiniBand Atomics
rc_compare_swap_mr RC compare and swap messaging rate
rc_fetch_add_mr RC fetch and add messaging rate
Verification
ver_rc_compare_swap Verify RC compare and swap
ver_rc_fetch_add Verify RC fetch and add

2) 开始测试
- 其中一台當做 server 直接執行 qperf 即可

[root@mysqlnode2 ~]# qperf 

- 另外一台当做 Client 需要使用参数

[root@sysbench ~]# qperf 192.168.1.1 tcp_bw tcp_lat conf
tcp_bw:
bw = 117 MB/sec
tcp_lat:
latency = 44.2 us
conf:
loc_node = localhost.localdomain
loc_cpu = 16 Cores: Intel Xeon X5667 @ 3.07GHz
loc_os = Linux 2.6.32-279.el6.x86_64
loc_qperf = 0.4.6
rem_node = localhost.localdomain
rem_cpu = 16 Cores: Intel Xeon E5520 @ 2.27GHz
rem_os = Linux 2.6.32-279.el6.x86_64
rem_qperf = 0.4.6

- tcp_bw
TCP 带宽 bandwidth,以 Byte 为单位

- tcp_lat
TCP 的延迟 latency 时间

- conf
显示系统的配置

下面的例子使用了 -oo msg_size:1:64k:*2 參數 从1k 到64K连续进行测试
当我們需要测试多种 message size 时就可以直接使用这个参数 -oo msg_size:1:64k:*2 ,他会将 message size 從 1 以2 的幕次(1,2,4,8,16,32,64,128…)一直加到 64K 为止.

[root@sysbench ~]# qperf -oo msg_size:1:64k:*2 172.16.0.51 tcp_bw tcp_lat
tcp_bw:
bw = 1.4 MB/sec
tcp_bw:
bw = 2.69 MB/sec
tcp_bw:
bw = 4.55 MB/sec
tcp_bw:
bw = 7.87 MB/sec
tcp_bw:
bw = 19.4 MB/sec
tcp_bw:
bw = 35.6 MB/sec
tcp_bw:
bw = 57.3 MB/sec
tcp_bw:
bw = 91.9 MB/sec
tcp_bw:
bw = 118 MB/sec
tcp_bw:
bw = 117 MB/sec
tcp_bw:
bw = 116 MB/sec
tcp_bw:
bw = 118 MB/sec
tcp_bw:
bw = 116 MB/sec
tcp_bw:
bw = 116 MB/sec
tcp_bw:
bw = 116 MB/sec
tcp_bw:
bw = 117 MB/sec
tcp_lat:
latency = 44.4 us
tcp_lat:
latency = 43.2 us
tcp_lat:
latency = 44.5 us
tcp_lat:
latency = 43.3 us
tcp_lat:
latency = 44.3 us
tcp_lat:
latency = 44.5 us
tcp_lat:
latency = 47.2 us
tcp_lat:
latency = 49.2 us
tcp_lat:
latency = 55 us
tcp_lat:
latency = 63.4 us
tcp_lat:
latency = 83.6 us
tcp_lat:
latency = 143 us
tcp_lat:
latency = 248 us
tcp_lat:
latency = 264 us
tcp_lat:
latency = 348 us
tcp_lat:
latency = 556 us
Trackback

no comment untill now

Add your comment now

切换到手机版