iperf 如何计算吞吐量和抖动?

iperf 如何计算吞吐量和抖动?

我读到过,iperf 基本上会尝试尽快通过连接发送尽可能多的信息,报告已实现的吞吐量。此工具在确定两台机器之间的链接可以提供的数据量时特别有用。

通过发送常规数据(而非测试数据)是否能够收集相同的结果?

我正在尝试做的是这样的;在前台发送数据,同时在后台收集统计数据(吞吐量和抖动)。

那么谁能告诉我 iperf 如何计算这两个值?

答案1

通过发送常规数据(而非测试数据)是否能够收集相同的结果?

我不这么认为,至少使用 iperf 不会。如果您可以使用 pcap/tcpdump/wireshark 捕获真实数据,那么您应该能够使用 wireshark 来确定抖动。

我怀疑 iperf 使用如下公式计算抖动:RFC 3550对于 RTP 协议。您可能需要深入研究源代码才能确定。

  If Si is the RTP timestamp from packet i, and Ri is the time of
  arrival in RTP timestamp units for packet i, then for two packets
  i and j, D may be expressed as

     D(i,j) = (Rj - Ri) - (Sj - Si) = (Rj - Sj) - (Ri - Si)

  The interarrival jitter SHOULD be calculated continuously as each
  data packet i is received from source SSRC_n, using this
  difference D for that packet and the previous packet i-1 in order
  of arrival (not necessarily in sequence), according to the formula

     J(i) = J(i-1) + (|D(i-1,i)| - J(i-1))/16

  Whenever a reception report is issued, the current value of J is
  sampled.

  The jitter calculation MUST conform to the formula specified here
  in order to allow profile-independent monitors to make valid
  interpretations of reports coming from different implementations.

相关内容