iperf3 - TCP 测量中 Retr 列的含义

问题描述 投票:0回答:1

阅读该工具的文档和与我的问题类似的票证(https://github.com/esnet/iperf/issues/343)后,我仍然不太理解/不知道 Retr 列的含义TCP 测量,但我不知道如何“使用”它:-(

假设有一个结果,如下所示,其中重试了 5 次。我明白了,这些是重传的 TCP 段数,但是 这些是否已成功重传,或者只是重试发送但不知道结果?

如果我想在末尾看到某种百分比 (%) 的汇总,该工具可以打印它吗,类似于 UDP 测量?如果没有,我怎样才能获得发送/接收段的总和来计算故障率?

工具版本:

>batman@bat-image:~$ iperf3 -v
iperf 3.8.1 (cJSON 1.7.13)
Linux bat-image 4.15.0-106-generic #107-Ubuntu SMP Thu Jun 4 11:27:52 UTC 2020 x86_64
Optional features available: CPU affinity setting, IPv6 flow label, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing
batman@bat-image:~$

操作系统:

Ubuntu-18.04
batman@bat-image:~$ uname -aLinux bat-image 4.15.0-106-generic #107-Ubuntu SMP Thu Jun 4 11:27:52 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
batman@bat-image:~$

日志:

batman@bat-image:~$iperf3 -c 192.168.122.1 -f K -B 192.168.122.141 -b 10m -t 10
Connecting to host 192.168.122.1, port 5201
[  5] local 192.168.122.141 port 34665 connected to 192.168.122.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  1.25 MBytes  10.5 Mbits/sec    0    297 KBytes      
[  5]   1.00-2.00   sec  1.25 MBytes  10.5 Mbits/sec    0    297 KBytes      
[  5]   2.00-3.00   sec  1.12 MBytes  9.43 Mbits/sec    0    297 KBytes      
[  5]   3.00-4.00   sec  1.25 MBytes  10.5 Mbits/sec    0    297 KBytes      
[  5]   4.00-5.00   sec  1.12 MBytes  9.43 Mbits/sec    0    297 KBytes      
[  5]   5.00-6.00   sec  1.25 MBytes  10.5 Mbits/sec    0    297 KBytes      
[  5]   6.00-7.00   sec  1.12 MBytes  9.44 Mbits/sec    2   1.41 KBytes      
[  5]   7.00-8.00   sec   512 KBytes  4.19 Mbits/sec    1   1.41 KBytes      
[  5]   8.00-9.00   sec  0.00 Bytes  0.00 Mbits/sec    1   1.41 KBytes      
[  5]   9.00-10.00  sec  0.00 Bytes  0.00 Mbits/sec    1   1.41 KBytes      
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr

[  5]   0.00-10.00  sec  8.87 MBytes  7.44 Mbits/sec    5             sender

[  5]   0.00-16.91  sec  7.62 MBytes  3.78 Mbits/sec                  receiver

iperf Done.
tcp measurement iperf3
1个回答
21
投票

在 iperf3 中,

Retr
列代表重新传输的 TCP 数据包,并指示必须再次发送(=重新传输)的 TCP 数据包的数量。

Retr
中的值越低越好。最佳值是 0,这意味着无论发送了多少个 TCP 数据包,都不需要重新发送一个数据包。大于零的值表示可能因网络拥塞(流量过多)或硬件故障导致的损坏而导致数据包丢失。

您在 Github 上的原始问题也已得到解答(来源):https://github.com/esnet/iperf/issues/343

您询问的是根据您测试的是 UDP 还是 TCP,iperf3 的不同输出。

  • 使用 UDP 时,数据包未到达目的地是可以接受的。为了指示连接/数据传输的质量,您可以获得未到达目的地的数据包百分比。

  • 使用 TCP 时,所有数据包都应该到达目的地,并检查是否丢失或损坏(因此称为传输控制协议)。如果数据包丢失,则会重新传输。为了指示连接的质量,您可以获得需要重新传输的数据包的数量。

因此 UDP 的百分比和 TCP 的

Retr
计数都是根据每个协议的具体情况进行调整的质量指标。

如果您想知道

Cwnd
列的含义,它代表拥塞窗口。拥塞窗口是一个 TCP 状态变量,用于限制 TCP 在收到 ACK 之前可以发送到网络的数据量。 来源:https://blog.stackpath.com/glossary-cwnd-and-rwnd/

© www.soinside.com 2019 - 2024. All rights reserved.