网络性能测试工具:ipert、netperf、qperf对比分析
一、iperf二进制包下载地址:https://iperf.fr/iperf-download.php
iperf是一个网络性能测试工具。iperf可以测试TCP和UDP带宽质量。iperf可以测量最大TCP带宽,具有多种参数和UDP特性。iperf可以报告带宽,延迟抖动和数据包丢失。利用iperf这一特性,可以用来测试一些网络设备如路由器,防火墙,交换机等的性能。
##服务端10.74.148.74启动iperf3,监听端口12345,请求间断时间1s
# iperf3 -s -p 12345 -i 1
-----------------------------------------------------------
Server listening on 12345
-----------------------------------------------------------
Accepted connection from 10.74.165.229, port 45368
local 192.168.1.76 port 12345 connected to 10.74.165.229 port 45370
[ ID] Interval Transfer Bandwidth
0.00-1.00 sec10.6 MBytes88.5 Mbits/sec
1.00-2.00 sec10.8 MBytes90.7 Mbits/sec
2.00-3.00 sec10.9 MBytes91.5 Mbits/sec
3.00-4.00 sec10.2 MBytes85.5 Mbits/sec
4.00-5.00 sec9.92 MBytes83.2 Mbits/sec
5.00-6.00 sec10.1 MBytes84.4 Mbits/sec
6.00-7.00 sec10.0 MBytes84.1 Mbits/sec
7.00-8.00 sec10.2 MBytes85.6 Mbits/sec
8.00-9.00 sec10.2 MBytes86.0 Mbits/sec
9.00-10.00sec10.4 MBytes87.0 Mbits/sec
10.00-10.05sec 492 KBytes87.0 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth
0.00-10.05sec0.00 Bytes0.00 bits/sec sender
0.00-10.05sec 104 MBytes86.7 Mbits/sec receiver
-----------------------------------------------------------
Server listening on 12345
-----------------------------------------------------------
##客户端向10.74.148.74发起请求,请求间断时间1s,测试时间长度10s
$ iperf3 -c 10.74.148.74 -p 12345-i 1 -t 10
Connecting to host 10.74.148.74, port 12345
local 10.10.10.19 port 45370 connected to 10.74.148.74 port 12345
[ ID] Interval Transfer Bandwidth RetrCwnd
0.00-1.00 sec13.4 MBytes 113 Mbits/sec 60 203 KBytes
1.00-2.00 sec10.8 MBytes90.6 Mbits/sec 32 186 KBytes
2.00-3.00 sec10.9 MBytes91.6 Mbits/sec 63 141 KBytes
3.00-4.00 sec10.1 MBytes84.9 Mbits/sec 93 72.4 KBytes
4.00-5.00 sec9.93 MBytes83.3 Mbits/sec 28 112 KBytes
5.00-6.00 sec10.1 MBytes84.6 Mbits/sec 75 86.9 KBytes
6.00-7.00 sec10.0 MBytes84.2 Mbits/sec 28 115 KBytes
7.00-8.00 sec10.2 MBytes85.4 Mbits/sec 47 112 KBytes
8.00-9.00 sec10.2 MBytes85.9 Mbits/sec 57 94.8 KBytes
9.00-10.00sec10.4 MBytes87.5 Mbits/sec 32 121 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
0.00-10.00sec 106 MBytes89.1 Mbits/sec515 sender
0.00-10.00sec 104 MBytes87.1 Mbits/sec receiver
iperf Done.
二、netperf
二进制包下载地址:https://pkgs.org/download/netperf
netperf是一种网络性能的测量工具,主要针对基于TCP或UDP的传输。Netperf根据应用的不同,可以进行不同模式的网络性能测试,即批量数据传输(bulk data transfer)模式和请求/应答(request/reponse)模式。
##服务端10.74.148.74开起12865的netserver程序监听
# netserver
Starting netserver with host 'IN(6)ADDR_ANY' port '12865' and family AF_UNSPEC
##客户端向10.74.148.74发起请求,测试时间长度10s
$ netperf -H 10.74.148.74 -l 10
MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.74.148.74 () port 0 AF_INET
Recv Send Send
Socket SocketMessageElapsed
Size Size Size Time Throughput
bytesbytes bytes secs. 10^6bits/sec
873801638416384 10.25 93.38
三、qperf
二进制包下载地址:https://pkgs.org/download/qperf
qperf 可以用来测试两个节点之间的带宽(bandwidth)和延迟(latency),除了支持tcp/udp/sctp外, qperf值得提的亮点是:第一可以支持RDMA测量,第二可进行循环遍历测试。这两点也是推荐该工具的主要原因。使用方法是:一个节点运行 qperf 作为服务端,另一个节点则运行 qperf 作为客户端,与服务端建立连接之后打流,获取带宽和延迟等数据。
页:
[1]