【问题标题】:iperf 2.0.5 TCP bidirectional test output out of orderiperf 2.0.5 TCP双向测试输出乱序
【发布时间】:2016-08-29 17:51:01
【问题描述】:

我正在使用 iperf 版本 2.0.5 来测试两台机器之间的 TCP 带宽(都运行 Linux Debian 8)。我正在使用双重测试在-d, --dualtest 选项的帮助下测量双向带宽,并且我有一个抓取测试结果的python 包装器(使用正则表达式),并且我依赖于 iperf 报告输出中两个结果的出现顺序。

但是,报告的结果不断改变出现的顺序,没有明显的原因。 它们会像这样出现一次:

Client connecting to ServerIP, TCP port 5002
TCP window size: 0.08 MByte (default)
------------------------------------------------------------
[  5] local ClientIP port 53653 connected with ServerIP port 5002
[  4] local ClientIP port 5002 connected with ServerIP port 46306
[ ID] Interval       Transfer     Bandwidth
[  5]  0.0-10.6 sec  3.00 MBytes  2.36 Mbits/sec
[  4]  0.0-10.7 sec  40.8 MBytes  32.0 Mbits/sec

其他时候是这样的:

Client connecting to ServerIP, TCP port 5002
TCP window size: 0.08 MByte (default)
------------------------------------------------------------
[  5] local ClientIP port 54043 connected with ServerIP port 5002
[  4] local ClientIP port 5002 connected with ServerIP port 46372
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.7 sec  40.8 MBytes  32.0 Mbits/sec
[  5]  0.0-10.7 sec  3.00 MBytes  2.36 Mbits/sec

我已经设置了我的包装器代码来假设第二个,它在最后一行中包含预期的更高带宽,而在它之前的那行中包含另一个带宽。

  • 如何强制 iperf 报告的特定输出顺序?
  • 为什么它使用45作为ID?
  • 有没有办法决定什么 数字用于ID?因为他们似乎正在从 一个测试到另一个。也就是说,它使用67 例如 它在不同的时间或从不同的机器运行。

这就是我在客户端机器上运行 iperf 的方式:

iperf -c  ServerIP  -d -p 5002  -f m

这是在服务器机器上:

iperf -s -p 5002 -D

【问题讨论】:

    标签: networking tcp server bandwidth iperf


    【解决方案1】:

    实际上无法控制此顺序,因为报告线程(输出报告)是与流量线程分开的线程。由于有两个线程“同时”启动并并行运行,因此流量线程首先完成竞争。

    附带说明,iperf 2.0.5 有已知的错误和性能增强,已在 2.0.9 中解决。

    鲍勃

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-10
      • 1970-01-01
      • 2016-02-24
      • 2011-06-05
      相关资源
      最近更新 更多