iperf的实际发送速率总是低于预期的目标带宽,直到达到一定的均衡。 为什么?

我在同一个虚拟机pipe理程序上的两个虚拟机之间做了一个UDP iperf 2.0.5-Ubuntutesting。 从下面的iperf输出中可以看出,我用“-b 686M”标志开始了我的第一次testing。 但是,iperf报告说只能以633Mbps(目标带宽的92%)发送stream量。 然后,我将目标带宽降低到633Mbps。 但是,iperf只能以604Mbps(目标带宽的95%)发送stream量。 然后我一直这样做,直到在561Mbps达到某种平衡,最终目标带宽一致地匹配实际带宽。

这里发生了什么? 为什么iperf以较低的速率发送指定目标带宽的stream量? 显然,从第一次testing运行iperf有足够的CPU资源生成686Mbps的stream量,如果真的想。

root@ubuntu:/# iperf -u -c 192.168.71.135 -b 686M -t 10 ------------------------------------------------------------ Client connecting to 192.168.71.135, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 208 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.71.136 port 37449 connected with 192.168.71.135 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 754 MBytes 633 Mbits/sec [ 3] Sent 538085 datagrams [ 3] Server Report: [ 3] 0.0-10.0 sec 754 MBytes 633 Mbits/sec 0.012 ms 40/538084 (0.0074%) [ 3] 0.0-10.0 sec 1 datagrams received out-of-order root@ubuntu:/# iperf -u -c 192.168.71.135 -b 633M -t 10 ------------------------------------------------------------ Client connecting to 192.168.71.135, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 208 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.71.136 port 58953 connected with 192.168.71.135 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 720 MBytes 604 Mbits/sec [ 3] Sent 513420 datagrams [ 3] Server Report: [ 3] 0.0-10.0 sec 720 MBytes 604 Mbits/sec 0.016 ms 49/513419 (0.0095%) [ 3] 0.0-10.0 sec 1 datagrams received out-of-order root@ubuntu:/# iperf -u -c 192.168.71.135 -b 604M -t 10 ------------------------------------------------------------ Client connecting to 192.168.71.135, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 208 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.71.136 port 45411 connected with 192.168.71.135 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 695 MBytes 583 Mbits/sec [ 3] Sent 495600 datagrams [ 3] Server Report: [ 3] 0.0-10.0 sec 695 MBytes 583 Mbits/sec 0.015 ms 199/495599 (0.04%) [ 3] 0.0-10.0 sec 1 datagrams received out-of-order root@ubuntu:/# iperf -u -c 192.168.71.135 -b 583M -t 10 ------------------------------------------------------------ Client connecting to 192.168.71.135, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 208 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.71.136 port 56228 connected with 192.168.71.135 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 669 MBytes 561 Mbits/sec [ 3] Sent 477143 datagrams [ 3] Server Report: [ 3] 0.0-10.0 sec 669 MBytes 561 Mbits/sec 0.013 ms 4/477142 (0.00084%) [ 3] 0.0-10.0 sec 1 datagrams received out-of-order root@ubuntu:/# iperf -u -c 192.168.71.135 -b 561M -t 10 ------------------------------------------------------------ Client connecting to 192.168.71.135, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 208 KByte (default) ------------------------------------------------------------ [ 3] local 192.168.71.136 port 41766 connected with 192.168.71.135 port 5001 [ ID] Interval Transfer Bandwidth [ 3] 0.0-10.0 sec 669 MBytes 561 Mbits/sec [ 3] Sent 477264 datagrams [ 3] Server Report: [ 3] 0.0-10.0 sec 669 MBytes 561 Mbits/sec 0.013 ms 405/477263 (0.085%) [ 3] 0.0-10.0 sec 1 datagrams received out-of-order root@ubuntu:/# iperf -u -c 192.168.71.135 -b 561M -t 10