为什么iPerf测试运行时间长于时间参数?

时间:2019-04-26 15:16:47

标签: iperf

我正在脚本的光学高速链路上运行iperf测试,该脚本运行iperf测试50秒,每1秒报告一次,测试完成并每1分钟重新开始。通常情况下一切正常,但是有时候连接正常时,测试的运行时间会比我设置的50秒参数长得多。我认为是因为如果由于连接问题导致数据包丢失,客户端就不会从服务器获得收据,并且客户端会尝试重新传输数据包

这是我在客户端上用于运行Iperf测试的内容...

iperf -c 10.150.91.176 -i 1 -t 50 -p 5203

通常我的结果看起来像这样(运行50秒)...

------------------------------------------------------------
Client connecting to 10.150.91.176, TCP port 5203
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 10.150.91.175 port 37832 connected with 10.150.91.176 port 5203
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec  1.05 GBytes  9.04 Gbits/sec
[  3]  1.0- 2.0 sec  1.08 GBytes  9.26 Gbits/sec
[  3]  2.0- 3.0 sec  1.03 GBytes  8.83 Gbits/sec
[  3]  3.0- 4.0 sec  1015 MBytes  8.51 Gbits/sec
[  3]  4.0- 5.0 sec  1.08 GBytes  9.25 Gbits/sec
[  3]  5.0- 6.0 sec  1.09 GBytes  9.36 Gbits/sec
[  3]  6.0- 7.0 sec  1.09 GBytes  9.36 Gbits/sec
[  3]  7.0- 8.0 sec  1.09 GBytes  9.39 Gbits/sec
[  3]  8.0- 9.0 sec  1.05 GBytes  9.04 Gbits/sec
[  3]  9.0-10.0 sec  1.03 GBytes  8.84 Gbits/sec
[  3] 10.0-11.0 sec  1.08 GBytes  9.27 Gbits/sec
[  3] 11.0-12.0 sec  1.09 GBytes  9.40 Gbits/sec
[  3] 12.0-13.0 sec  1.09 GBytes  9.36 Gbits/sec
[  3] 13.0-14.0 sec  1.10 GBytes  9.41 Gbits/sec
[  3] 14.0-15.0 sec  1.01 GBytes  8.69 Gbits/sec
[  3] 15.0-16.0 sec  1.06 GBytes  9.14 Gbits/sec
[  3] 16.0-17.0 sec  1.01 GBytes  8.67 Gbits/sec
[  3] 17.0-18.0 sec  1001 MBytes  8.39 Gbits/sec
[  3] 18.0-19.0 sec  1.04 GBytes  8.90 Gbits/sec
[  3] 19.0-20.0 sec  1.08 GBytes  9.32 Gbits/sec
[  3] 20.0-21.0 sec  1.06 GBytes  9.06 Gbits/sec
[  3] 21.0-22.0 sec  1014 MBytes  8.51 Gbits/sec
[  3] 22.0-23.0 sec  1.01 GBytes  8.67 Gbits/sec
[  3] 23.0-24.0 sec  1.08 GBytes  9.30 Gbits/sec
[  3] 24.0-25.0 sec  1.07 GBytes  9.22 Gbits/sec
[  3] 25.0-26.0 sec  1.04 GBytes  8.91 Gbits/sec
[  3] 26.0-27.0 sec  1.09 GBytes  9.36 Gbits/sec
[  3] 27.0-28.0 sec  1.07 GBytes  9.21 Gbits/sec
[  3] 28.0-29.0 sec  1.04 GBytes  8.92 Gbits/sec
[  3] 29.0-30.0 sec  1.06 GBytes  9.14 Gbits/sec
[  3] 30.0-31.0 sec  1.09 GBytes  9.39 Gbits/sec
[  3] 31.0-32.0 sec  1.09 GBytes  9.36 Gbits/sec
[  3] 32.0-33.0 sec  1.09 GBytes  9.39 Gbits/sec
[  3] 33.0-34.0 sec  1.08 GBytes  9.30 Gbits/sec
[  3] 34.0-35.0 sec  1.07 GBytes  9.21 Gbits/sec
[  3] 35.0-36.0 sec  1.07 GBytes  9.19 Gbits/sec
[  3] 36.0-37.0 sec  1.08 GBytes  9.27 Gbits/sec
[  3] 37.0-38.0 sec  1.05 GBytes  9.00 Gbits/sec
[  3] 38.0-39.0 sec  1.04 GBytes  8.90 Gbits/sec
[  3] 39.0-40.0 sec  1.09 GBytes  9.40 Gbits/sec
[  3] 40.0-41.0 sec  1.06 GBytes  9.12 Gbits/sec
[  3] 41.0-42.0 sec  1.00 GBytes  8.60 Gbits/sec
[  3] 42.0-43.0 sec  1.08 GBytes  9.29 Gbits/sec
[  3] 43.0-44.0 sec  1.08 GBytes  9.24 Gbits/sec
[  3] 44.0-45.0 sec  1.05 GBytes  9.03 Gbits/sec
[  3] 45.0-46.0 sec  1.04 GBytes  8.97 Gbits/sec
[  3] 46.0-47.0 sec  1.08 GBytes  9.28 Gbits/sec
[  3] 47.0-48.0 sec  1.07 GBytes  9.16 Gbits/sec
[  3] 48.0-49.0 sec  1.09 GBytes  9.34 Gbits/sec
[  3] 49.0-50.0 sec  1.08 GBytes  9.28 Gbits/sec
[  3]  0.0-50.0 sec  53.0 GBytes  9.11 Gbits/sec

但是偶尔看起来好像遇到错误,我得到这样的信息(运行79秒)...

------------------------------------------------------------
Client connecting to 10.150.91.176, TCP port 5203
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 10.150.91.175 port 57184 connected with 10.150.91.176 port 5203
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0- 1.0 sec  26.5 MBytes   222 Mbits/sec
[  3]  1.0- 2.0 sec  29.1 MBytes   244 Mbits/sec
[  3]  2.0- 3.0 sec  23.9 MBytes   200 Mbits/sec
[  3]  3.0- 4.0 sec  26.0 MBytes   218 Mbits/sec
[  3]  4.0- 5.0 sec  1.38 MBytes  11.5 Mbits/sec
[  3]  5.0- 6.0 sec  13.0 MBytes   109 Mbits/sec
[  3]  6.0- 7.0 sec  15.0 MBytes   126 Mbits/sec
[  3]  7.0- 8.0 sec  5.62 MBytes  47.2 Mbits/sec
[  3]  8.0- 9.0 sec  1.00 MBytes  8.39 Mbits/sec
[  3]  9.0-10.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 10.0-11.0 sec  13.2 MBytes   111 Mbits/sec
[  3] 11.0-12.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 12.0-13.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 13.0-14.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 14.0-15.0 sec  22.5 MBytes   189 Mbits/sec
[  3] 15.0-16.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 16.0-17.0 sec  20.0 MBytes   168 Mbits/sec
[  3] 17.0-18.0 sec  14.4 MBytes   121 Mbits/sec
[  3] 18.0-19.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 19.0-20.0 sec  25.6 MBytes   215 Mbits/sec
[  3] 20.0-21.0 sec  23.2 MBytes   195 Mbits/sec
[  3] 25.0-26.0 sec  20.0 MBytes   168 Mbits/sec
[  3] 26.0-27.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 27.0-28.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 28.0-29.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 29.0-30.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 30.0-31.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 31.0-32.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 32.0-33.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 33.0-34.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 34.0-35.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 35.0-36.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 36.0-37.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 37.0-38.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 38.0-39.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 39.0-40.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 40.0-41.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 41.0-42.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 42.0-43.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 43.0-44.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 44.0-45.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 45.0-46.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 46.0-47.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 47.0-48.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 48.0-49.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 49.0-50.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 50.0-51.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 51.0-52.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 52.0-53.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 53.0-54.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 54.0-55.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 55.0-56.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 56.0-57.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 57.0-58.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 58.0-59.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 59.0-60.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 60.0-61.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 61.0-62.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 62.0-63.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 63.0-64.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 64.0-65.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 65.0-66.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 66.0-67.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 67.0-68.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 68.0-69.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 69.0-70.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 70.0-71.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 71.0-72.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 72.0-73.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 73.0-74.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 74.0-75.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 75.0-76.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 76.0-77.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 77.0-78.0 sec  0.00 Bytes  0.00 bits/sec
[  3] 78.0-79.0 sec  0.00 Bytes  0.00 bits/sec
[  3]  0.0-79.7 sec   142 MBytes  15.0 Mbits/sec

有什么方法可以设置它,使其仅在设置的50秒时间间隔内运行?还是使用UDP iperf测试更好地做到这一点?如果我每次只能进行50秒钟的测试,那么对我的数据/统计数据会更好。谢谢

0 个答案:

没有答案