如何使用 iPerf2 / iPerf3 测试网络速度、性能和带宽

1. 写在前面

iPerf(Internet Performance Working Group ) 是专业的网络测试工具,基于 TCP/IP 和 UDP/IP 协议,测量两个节点之间 TCP 和 UDP 端口的网络带宽,支持提供网络延迟、丢包率等统计信息。

实现机制相当简单:它创建 TCP 和 UDP 流,并将流量从一台主机发送到另一台主机,然后向用户报告最大带宽。这允许用户确定网络吞吐量和最高带宽速度。

iPerf 分 iPerf2 和 iPerf3 版本,两者都用于测量网络性能,完全独立实现,具有不同的优势、不同的选项和不同的功能。执行命令也不一样,iPerf3 为 $ iperf3 ...iPerf2 为 $ iperf ...

本文通过示例分别介绍及两者之间的区别。

2. iPerf2

iPerf2(iPerf)是一种通过 TCP 和 UDP 套接字测量网络带宽和延迟(包括双队列 L4S)的方法。其目标之一是保持 iperf 代码库在各种平台和操作系统上运行。它是一种多线程架构,与系统中的 CPU 或内核数量成比例增长,通过这些 CPU 或内核,它可以使用高影响和低影响策略获取和报告网络性能。

最新版本:2.1.9 2023 年 3 月 14 日

下载地址:https://sourceforge.net/projects/iperf2/files/iperf-2.1.9.tar.gz/download

2.1 如何在 Linux 系统中安装 iPerf2

iPerf 由客户端和服务端组成,客户端连接到需要测试速度的服务端,且客户端和服务端均需要运行 iPerf 程序。

如果两台机器都运行 Ubuntu/Debian,则操作步骤相同:

(1) 下载并解压 iperf 源码包

$ wget https://sourceforge.net/projects/iperf2/files/iperf-2.1.9.tar.gz/download

$ tar zxvf iperf-2.1.9.tar.gz
--------------------------------------------------------------------------------------
iperf-2.1.9/
iperf-2.1.9/m4/
iperf-2.1.9/m4/ax_create_stdint_h.m4
... ...

**(2) 安装 iperf **

$ cd iperf-2.1.9/
$ ./configure
$ make
$ make install

(3) 验证

$ iperf --version
iperf version 2.1.9 (14 March 2023) pthreads

备注:Ubuntu 其他安装方式(不建议,版本老 Bug 多):

$ sudo apt install iperf
$ iperf --version
iperf version 2.0.13 (21 Jan 2019) pthreads

2.2 如何测试两个 Linux 服务器之间的网络速度

测试环境:

  • Server:10.20.3.215

  • Client:10.100.0.111

2.2.1 启动 Server 端

使用 -s 选项在 Server 模式下启动 iperf,默认情况下监听 5201 端口。

root@dev:~# iperf -s

------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 128 KByte (default)
------------------------------------------------------------

当终端显示 Server listening on 5001 时,就表示 Server 已经正常运行,等待测试了。默认情况下,iPerf 使用 TCP,并监听端口 5001。

可选参数:

  • -u: 使用 UDP 而不是 TCP;

  • -p: 更改默认端口;

例如,让 Server 端使用 UDP 并监听 5003 端口:

root@dev:~# iperf -s -u -p 5003
------------------------------------------------------------
Server listening on UDP port 5003
UDP buffer size: 208 KByte (default)
------------------------------------------------------------

现在监听 UDP 端口 5003;

2.2.2 从 Client 端连接 Server 端

2.2.2.1 使用 TCP

启动 Server 后,从 Client 连接到 Server:

root@dev:~# iperf -c 10.20.3.215
------------------------------------------------------------
Client connecting to 10.20.3.215, TCP port 5001
TCP window size: 16.0 KByte (default)
------------------------------------------------------------
[ 1] local 10.100.0.111 port 33346 connected with 10.20.3.215 port 5001 (icwnd/mss/irtt=13/1398/2931)
[ ID] Interval Transfer Bandwidth
[ 1] 0.00-10.05 sec 1.06 GBytes 905 Mbits/sec

iperf -c 10.20.3.215 启动与 Server 端 10.20.3.215 连接。

默认的 TCP 窗口大小 85 KB(TCP window size)。 间隔时间为10秒。 传输了 1 GB数据。 带宽为 5.10 Mbits/sec。

可选参数:

  • -i: 指定间隔时间(以秒为单位),默认值为 10s;

  • -t: 指定运行测试的时间,以秒为单位; 

  • -p: 指定端口,默认为 5001;

  • -w: 指定 TCP 窗口大小,默认为 85 KB;

例如:在 Client 端,我们并发 4 个数据流,测试总时长为 30 秒,每 5 秒输出一次结果。以下为测试所使用的命令。

  • 间隔时间设置为 5 秒;

  • 测试持续时间设置为 30 秒;

  • TCP 窗口大小设置为 416 KB;

  • 端口设置为 5001;

  • 并发 4 组数据流;

root@dev:~# iperf -c 10.20.3.215 -P 4 -i 5 -t 30 -w 416K -p 5001
------------------------------------------------------------
Client connecting to 10.20.3.215, TCP port 5001
TCP window size: 416 KByte
------------------------------------------------------------
[ 2] local 10.100.0.111 port 47764 connected with 10.20.3.215 port 5001 (icwnd/mss/irtt=13/1398/2752)
[ 1] local 10.100.0.111 port 47756 connected with 10.20.3.215 port 5001 (icwnd/mss/irtt=13/1398/2833)
[ 3] local 10.100.0.111 port 47780 connected with 10.20.3.215 port 5001 (icwnd/mss/irtt=13/1398/2690)
[ 4] local 10.100.0.111 port 47788 connected with 10.20.3.215 port 5001 (icwnd/mss/irtt=13/1398/2561)
[ ID] Interval Transfer Bandwidth
[ 1] 0.00-5.00 sec 135 MBytes 226 Mbits/sec
[ 2] 0.00-5.00 sec 136 MBytes 228 Mbits/sec
[ 3] 0.00-5.00 sec 136 MBytes 228 Mbits/sec
[ 4] 0.00-5.00 sec 136 MBytes 227 Mbits/sec
[SUM] 0.00-5.00 sec 542 MBytes 909 Mbits/sec
[ 1] 5.00-10.00 sec 135 MBytes 227 Mbits/sec
[ 2] 5.00-10.00 sec 135 MBytes 227 Mbits/sec
[ 3] 5.00-10.00 sec 135 MBytes 226 Mbits/sec
[ 4] 5.00-10.00 sec 135 MBytes 227 Mbits/sec
[SUM] 5.00-10.00 sec 541 MBytes 907 Mbits/sec
[ 1] 10.00-15.00 sec 135 MBytes 227 Mbits/sec
[ 2] 10.00-15.00 sec 136 MBytes 227 Mbits/sec
[ 3] 10.00-15.00 sec 136 MBytes 227 Mbits/sec
[ 4] 10.00-15.00 sec 135 MBytes 227 Mbits/sec
[SUM] 10.00-15.00 sec 542 MBytes 909 Mbits/sec
[ 1] 15.00-20.00 sec 136 MBytes 228 Mbits/sec
[ 2] 15.00-20.00 sec 135 MBytes 227 Mbits/sec
[ 3] 15.00-20.00 sec 136 MBytes 228 Mbits/sec
[ 4] 15.00-20.00 sec 135 MBytes 226 Mbits/sec
[SUM] 15.00-20.00 sec 542 MBytes 908 Mbits/sec
[ 1] 20.00-25.00 sec 135 MBytes 226 Mbits/sec
[ 2] 20.00-25.00 sec 135 MBytes 227 Mbits/sec
[ 3] 20.00-25.00 sec 136 MBytes 228 Mbits/sec
[ 4] 20.00-25.00 sec 135 MBytes 227 Mbits/sec
[SUM] 20.00-25.00 sec 541 MBytes 908 Mbits/sec
[ 1] 25.00-30.00 sec 136 MBytes 228 Mbits/sec
[ 2] 25.00-30.00 sec 135 MBytes 226 Mbits/sec
[ 3] 25.00-30.00 sec 136 MBytes 228 Mbits/sec
[ 4] 25.00-30.00 sec 135 MBytes 226 Mbits/sec
[SUM] 25.00-30.00 sec 541 MBytes 908 Mbits/sec
[ 1] 0.00-30.02 sec 812 MBytes 227 Mbits/sec
[ 2] 0.00-30.02 sec 812 MBytes 227 Mbits/sec
[ 4] 0.00-30.02 sec 811 MBytes 227 Mbits/sec
[ 3] 0.00-30.02 sec 813 MBytes 227 Mbits/sec
[SUM] 0.00-30.00 sec 3.17 GBytes 908 Mbits/sec

测试时,iPerf 的 Server 端和 Client 端都会输出测试结果。测试过程中,根据间隔时间的参数,终端会不断地显示当前时间间隔内测试结果。当测试结束后,iPerf 将测试结果汇总,输出最终测试结果。

2.2.2.2 使用 UDP

使用 UDP 代替 TCP。对应 Server 端 也需要使用 UDP。

Server:

root@dev:~# iperf -s -u
------------------------------------------------------------
Server listening on UDP port 5001
UDP buffer size: 208 KByte (default)
------------------------------------------------------------

Client:

root@dev:~# iperf -c 10.20.3.215 -u
------------------------------------------------------------
Client connecting to 10.20.3.215, UDP port 5001
Sending 1470 byte datagrams, IPG target: 11215.21 us (kalman adjust)
UDP buffer size: 208 KByte (default)
------------------------------------------------------------
write failed: Message too long
[ ID] Interval Transfer Bandwidth
[ 1] 0.00-0.01 sec 2.87 KBytes 2.07 Mbits/sec
[ 1] Sent 3 datagrams
[ 1] local 10.100.0.111 port 58816 connected with 10.20.3.215 port 5001
[ 3] WARNING: did not receive ack of last datagram after 10 tries.

我们注意到带宽比 TCP 低得多。原因是 iPerf 默认将 UDP 的带宽限制为 1Mbits/sec。我们可以通过添加 -b 选项来取代这一限制:

root@dev:~# iperf -c 10.20.3.215 -u -b 1000M
------------------------------------------------------------
Client connecting to 10.20.3.215, UDP port 5001
Sending 1470 byte datagrams, IPG target: 11.22 us (kalman adjust)
UDP buffer size: 208 KByte (default)
------------------------------------------------------------
[ 1] local 10.100.0.111 port 49639 connected with 10.20.3.215 port 5001
[ ID] Interval Transfer Bandwidth
[ 1] 0.00-10.00 sec 868 MBytes 728 Mbits/sec
[ 1] Sent 618910 datagrams
[ 1] Server Report:
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 1] 0.00-10.01 sec 458 MBytes 384 Mbits/sec 0.049 ms 291930/618910 (47%)
[ 1] 0.00-10.01 sec 7 datagrams received out-of-order

可以看到,带宽明显增加了。

3. iPerf3

iperf3 是从零开始的全新实现,目标是实现更小、更简单的代码库,并不向后兼容 iperf2

3.1 如何在 Linux 系统中安装 iPerf3

开始使用 iperf3 之前,需要在两台用于基准测试的计算机上安装它。由于 iperf3 在大多数常见 Linux 发行版的官方软件仓库中都有提供,因此使用软件包管理器很容易安装,如下所示。

$ sudo apt install iperf3         [On Debian, Ubuntu and Mint]
$ sudo yum install iperf3 [On RHEL/CentOS/Fedora and Rocky/AlmaLinux]
$ sudo emerge -a net-misc/iperf [On Gentoo Linux]
$ sudo apk add iperf3 [On Alpine Linux]
$ sudo pacman -S iperf3 [On Arch Linux]
$ sudo zypper install iperf3 [On OpenSUSE]

在两台机器上都安装了 iperf3 后,就可以开始测试网络吞吐量了。

3.2 如何测试两个 Linux 服务器之间的网络速度

测试环境:

  • Server:10.20.3.215

  • Client:10.100.0.111

3.2.1 启动 Server 端

使用 -s 选项在 Server 模式下启动 iperf3,默认情况下监听 5201 端口。可以使用 -f 指定报告格式(k, m, g 表示 Kbits、Mbits、Gbits 或 K、M、G 表示 KBytes、Mbytes、Gbytes),如:

root@dev:~# iperf3 -s -f K 
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

如果服务器上的其他程序正在使用 5201 端口,可以使用 -p 指定不同的端口(如 3000),如:

root@dev:~# iperf3 -s -p 3000
-----------------------------------------------------------
Server listening on 3000
-----------------------------------------------------------

可以选择使用 -D 将服务作为守护进程运行,并将服务信息写入日志文件,如:

$ iperf3 -s -D > iperf3log

3.2.1 启动 Client 端

使用 -c 在 client 模式下运行 iperf3,并指定运行 Server 的主机(IP 地址、域或主机名)。

root@dev:~# iperf3 -c 10.20.3.215 -f K
Connecting to host 10.20.3.215, port 5201
[ 5] local 10.100.0.111 port 53552 connected to 10.20.3.215 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 109 MBytes 111723 KBytes/sec 36 680 KBytes
[ 5] 1.00-2.00 sec 108 MBytes 110080 KBytes/sec 0 789 KBytes
[ 5] 2.00-3.00 sec 109 MBytes 111253 KBytes/sec 16 673 KBytes
[ 5] 3.00-4.00 sec 109 MBytes 111468 KBytes/sec 0 784 KBytes
[ 5] 4.00-5.00 sec 108 MBytes 110068 KBytes/sec 16 658 KBytes
[ 5] 5.00-6.00 sec 109 MBytes 111369 KBytes/sec 0 773 KBytes
[ 5] 6.00-7.00 sec 108 MBytes 110080 KBytes/sec 15 654 KBytes
[ 5] 7.00-8.00 sec 109 MBytes 111339 KBytes/sec 0 767 KBytes
[ 5] 8.00-9.00 sec 106 MBytes 108823 KBytes/sec 16 648 KBytes
[ 5] 9.00-10.00 sec 109 MBytes 111311 KBytes/sec 0 763 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.06 GBytes 110751 KBytes/sec 99 sender
[ 5] 0.00-10.00 sec 1.05 GBytes 110378 KBytes/sec receiver

iperf Done.

18 至 20 秒后,client 终止并显示基准平均吞吐量的结果;

3.3 如何在 Linux 中执行高级网络吞吐量测试

TCP 窗口大小(TCP window size)是决定特定时间内网络中数据量的重要因素之一,它对调整 TCP 连接非常重要。可以使用 -w 设置window size/socket buffer size大小,如下所示:

root@dev:~# iperf3 -c 10.20.3.215 -f K -w 400K
Connecting to host 10.20.3.215, port 5201
[ 5] local 10.100.0.111 port 41882 connected to 10.20.3.215 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 107 MBytes 109382 KBytes/sec 0 218 KBytes
[ 5] 1.00-2.00 sec 107 MBytes 109990 KBytes/sec 0 218 KBytes
[ 5] 2.00-3.00 sec 108 MBytes 110296 KBytes/sec 0 218 KBytes
[ 5] 3.00-4.00 sec 108 MBytes 110354 KBytes/sec 0 218 KBytes
[ 5] 4.00-5.00 sec 107 MBytes 109439 KBytes/sec 0 218 KBytes
[ 5] 5.00-6.00 sec 108 MBytes 110338 KBytes/sec 0 218 KBytes
[ 5] 6.00-7.00 sec 107 MBytes 109574 KBytes/sec 0 218 KBytes
[ 5] 7.00-8.00 sec 108 MBytes 110454 KBytes/sec 0 218 KBytes
[ 5] 8.00-9.00 sec 107 MBytes 110021 KBytes/sec 0 218 KBytes
[ 5] 9.00-10.00 sec 108 MBytes 110380 KBytes/sec 0 218 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.05 GBytes 110023 KBytes/sec 0 sender
[ 5] 0.00-10.00 sec 1.05 GBytes 109988 KBytes/sec receiver

iperf Done.

要反向模式运行,即 Server 发送,Client 接收,请添加 -R 选项。

root@dev:~# iperf3 -c 10.20.3.215 -f K -w 400K -R
Connecting to host 10.20.3.215, port 5201
Reverse mode, remote host 10.20.3.215 is sending
[ 5] local 10.100.0.111 port 46760 connected to 10.20.3.215 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 106 MBytes 108551 KBytes/sec
[ 5] 1.00-2.00 sec 108 MBytes 110173 KBytes/sec
[ 5] 2.00-3.00 sec 108 MBytes 110152 KBytes/sec
[ 5] 3.00-4.00 sec 106 MBytes 108855 KBytes/sec
[ 5] 4.00-5.00 sec 107 MBytes 109859 KBytes/sec
[ 5] 5.00-6.00 sec 106 MBytes 108182 KBytes/sec
[ 5] 6.00-7.00 sec 107 MBytes 109341 KBytes/sec
[ 5] 7.00-8.00 sec 108 MBytes 110443 KBytes/sec
[ 5] 8.00-9.00 sec 107 MBytes 109738 KBytes/sec
[ 5] 9.00-10.00 sec 108 MBytes 110363 KBytes/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.05 GBytes 109606 KBytes/sec 0 sender
[ 5] 0.00-10.00 sec 1.04 GBytes 109566 KBytes/sec receiver

iperf Done.

要运行双向测试,即同时测量两个方向的带宽,请使用 -d 选项。

root@dev:~# iperf3 -c 10.20.3.215 -f K -w 400K -d

如果想在 Client 输出中获取 Server 结果,请使用 --get-server-output 选项。

root@dev:~# iperf3 -c 10.20.3.215 -f K -w 400K -R --get-server-output
Connecting to host 10.20.3.215, port 5201
Reverse mode, remote host 10.20.3.215 is sending
[ 5] local 10.100.0.111 port 54610 connected to 10.20.3.215 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 105 MBytes 107731 KBytes/sec
[ 5] 1.00-2.00 sec 106 MBytes 108141 KBytes/sec
[ 5] 2.00-3.00 sec 107 MBytes 109897 KBytes/sec
[ 5] 3.00-4.00 sec 108 MBytes 110664 KBytes/sec
[ 5] 4.00-5.00 sec 108 MBytes 110152 KBytes/sec
[ 5] 5.00-6.00 sec 108 MBytes 110387 KBytes/sec
[ 5] 6.00-7.00 sec 107 MBytes 109670 KBytes/sec
[ 5] 7.00-8.00 sec 107 MBytes 110040 KBytes/sec
[ 5] 8.00-9.00 sec 108 MBytes 110933 KBytes/sec
[ 5] 9.00-10.00 sec 107 MBytes 109457 KBytes/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.05 GBytes 109743 KBytes/sec 0 sender
[ 5] 0.00-10.00 sec 1.05 GBytes 109707 KBytes/sec receiver

Server output:
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 10.100.0.111, port 54606
[ 5] local 10.0.1.252 port 5201 connected to 10.100.0.111 port 54610
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 5] 0.00-1.00 sec 105 MBytes 107961 KBytes/sec 0 218 KBytes
[ 5] 1.00-2.00 sec 106 MBytes 108119 KBytes/sec 0 218 KBytes
[ 5] 2.00-3.00 sec 107 MBytes 109923 KBytes/sec 0 218 KBytes
[ 5] 3.00-4.00 sec 108 MBytes 110809 KBytes/sec 0 218 KBytes
[ 5] 4.00-5.00 sec 107 MBytes 110079 KBytes/sec 0 218 KBytes
[ 5] 5.00-6.00 sec 108 MBytes 110407 KBytes/sec 0 218 KBytes
[ 5] 6.00-7.00 sec 107 MBytes 109641 KBytes/sec 0 218 KBytes
[ 5] 7.00-8.00 sec 108 MBytes 110141 KBytes/sec 0 218 KBytes
[ 5] 8.00-9.00 sec 108 MBytes 110789 KBytes/sec 0 218 KBytes
[ 5] 9.00-10.00 sec 107 MBytes 109542 KBytes/sec 0 218 KBytes
[ 5] 10.00-10.00 sec 0.00 Bytes 0.00 KBytes/sec 0 218 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 5] 0.00-10.00 sec 1.05 GBytes 109734 KBytes/sec 0 sender
[ 5] 0.00-10.00 sec 0.00 Bytes 0.00 KBytes/sec receiver


iperf Done.

使用 -P 选项设置同时运行的并行客户端流的数量(本例中为两个)。

root@dev:~# iperf3 -c 10.20.3.215 -f K -w 400K -P 2
Connecting to host 10.20.3.215, port 5201
[ 5] local 10.100.0.111 port 53508 connected to 10.20.3.215 port 5201
[ 7] local 10.100.0.111 port 53518 connected to 10.20.3.215 port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-1.00 sec 54.0 MBytes 55326 KBytes/sec 0 217 KBytes
[ 7] 0.00-1.00 sec 54.0 MBytes 55290 KBytes/sec 0 216 KBytes
[SUM] 0.00-1.00 sec 108 MBytes 110617 KBytes/sec 0
- - - - - - - - - - - - - - - - - - - - - - - - -
[ 5] 1.00-2.00 sec 53.7 MBytes 54950 KBytes/sec 0 217 KBytes
[ 7] 1.00-2.00 sec 53.7 MBytes 54968 KBytes/sec 0 216 KBytes
[SUM] 1.00-2.00 sec 107 MBytes 109918 KBytes/sec 0
- - - - - - - - - - - - - - - - - - - - - - - - -
[ 5] 2.00-3.00 sec 53.8 MBytes 55137 KBytes/sec 0 217 KBytes
[ 7] 2.00-3.00 sec 53.8 MBytes 55122 KBytes/sec 0 216 KBytes
[SUM] 2.00-3.00 sec 108 MBytes 110259 KBytes/sec 0
- - - - - - - - - - - - - - - - - - - - - - - - -
[ 5] 3.00-4.00 sec 54.0 MBytes 55244 KBytes/sec 0 217 KBytes
[ 7] 3.00-4.00 sec 53.8 MBytes 55099 KBytes/sec 0 216 KBytes
[SUM] 3.00-4.00 sec 108 MBytes 110344 KBytes/sec 0
- - - - - - - - - - - - - - - - - - - - - - - - -
[ 5] 4.00-5.00 sec 53.9 MBytes 55244 KBytes/sec 0 217 KBytes
[ 7] 4.00-5.00 sec 54.0 MBytes 55289 KBytes/sec 0 216 KBytes
[SUM] 4.00-5.00 sec 108 MBytes 110532 KBytes/sec 0
- - - - - - - - - - - - - - - - - - - - - - - - -
[ 5] 5.00-6.00 sec 53.6 MBytes 54908 KBytes/sec 0 217 KBytes
[ 7] 5.00-6.00 sec 53.4 MBytes 54711 KBytes/sec 0 216 KBytes
[SUM] 5.00-6.00 sec 107 MBytes 109619 KBytes/sec 0
- - - - - - - - - - - - - - - - - - - - - - - - -
[ 5] 6.00-7.00 sec 53.7 MBytes 54969 KBytes/sec 0 217 KBytes
[ 7] 6.00-7.00 sec 53.4 MBytes 54702 KBytes/sec 0 216 KBytes
[SUM] 6.00-7.00 sec 107 MBytes 109671 KBytes/sec 0
- - - - - - - - - - - - - - - - - - - - - - - - -
[ 5] 7.00-8.00 sec 54.0 MBytes 55323 KBytes/sec 0 217 KBytes
[ 7] 7.00-8.00 sec 54.0 MBytes 55307 KBytes/sec 0 216 KBytes
[SUM] 7.00-8.00 sec 108 MBytes 110630 KBytes/sec 0
- - - - - - - - - - - - - - - - - - - - - - - - -
[ 5] 8.00-9.00 sec 53.4 MBytes 54704 KBytes/sec 0 217 KBytes
[ 7] 8.00-9.00 sec 53.4 MBytes 54636 KBytes/sec 0 216 KBytes
[SUM] 8.00-9.00 sec 107 MBytes 109339 KBytes/sec 0
- - - - - - - - - - - - - - - - - - - - - - - - -
[ 5] 9.00-10.00 sec 53.4 MBytes 54721 KBytes/sec 0 217 KBytes
[ 7] 9.00-10.00 sec 53.5 MBytes 54735 KBytes/sec 0 216 KBytes
[SUM] 9.00-10.00 sec 107 MBytes 109456 KBytes/sec 0
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 538 MBytes 55053 KBytes/sec 0 sender
[ 5] 0.00-10.00 sec 537 MBytes 55012 KBytes/sec receiver
[ 7] 0.00-10.00 sec 537 MBytes 54986 KBytes/sec 0 sender
[ 7] 0.00-10.00 sec 537 MBytes 54962 KBytes/sec receiver
[SUM] 0.00-10.00 sec 1.05 GBytes 110039 KBytes/sec 0 sender
[SUM] 0.00-10.00 sec 1.05 GBytes 109974 KBytes/sec receiver

iperf Done.

更多信息,请参阅 iperf3 man 页。

root@dev:~# man iperf3

4. iPerf2 vs iPerf3

以下图表显示iPerf2、iPerf3差异: https://iperf2.sourceforge.io/IperfCompare.html

如何使用 iPerf2 / iPerf3 测试网络速度、性能和带宽

感谢您花时间阅读文章!

收藏本站不迷路!

原文始发于微信公众号(滑翔的纸飞机):如何使用 iPerf2 / iPerf3 测试网络速度、性能和带宽

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/260861.html

(0)
土豆大侠的头像土豆大侠

相关推荐

发表回复

登录后才能评论
极客之音——专业性很强的中文编程技术网站,欢迎收藏到浏览器,订阅我们!