Package: iperf
Version: 2.0.5-3
Sometimes Iperf client in UDP mode sends less data than specified with
--bandwidth option. For example:
root@debian-linx:~# iperf -c 195.222.7.252 -fm -t 600 -i60 -u -b 500m
------------------------------------------------------------
Client connecting to 195.222.7.252, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size: 0.16 MByte (default)
------------------------------------------------------------
[ 3] local 192.168.1.2 port 35830 connected with 195.222.7.252 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-60.0 sec 854 MBytes 119 Mbits/sec
[ 3] 60.0-120.0 sec 860 MBytes 120 Mbits/sec
[ 3] 120.0-180.0 sec 859 MBytes 120 Mbits/sec
[ 3] 180.0-240.0 sec 864 MBytes 121 Mbits/sec
[ 3] 240.0-300.0 sec 862 MBytes 121 Mbits/sec
[ 3] 300.0-360.0 sec 860 MBytes 120 Mbits/sec
[ 3] 360.0-420.0 sec 862 MBytes 121 Mbits/sec
[ 3] 420.0-480.0 sec 857 MBytes 120 Mbits/sec
[ 3] 480.0-540.0 sec 860 MBytes 120 Mbits/sec
[ 3] 540.0-600.0 sec 862 MBytes 120 Mbits/sec
[ 3] 0.0-600.0 sec 8602 MBytes 120 Mbits/sec
[ 3] Sent 6135844 datagrams
[ 3] Server Report:
[ 3] 0.0-600.0 sec 8602 MBytes 120 Mbits/sec 0.045 ms 1262/6135843
(0.021%)
[ 3] 0.0-600.0 sec 1263 datagrams received out-of-order
root@debian-linx:~#
As seen above, during all the intervals, transferred data is around 860
mebibytes and bandwidth is around 120Mbps while specified bandwidth was
500Mbps. Based on the analysis of source code, tracing system calls of Iperf
client and playing around with Linux kernel traffic control packet loss and
policing capabilities, it's clear that:
1) ~120Mbps was the actual bandwidth put onto wire
2) Iperf client simply calls the write() system call to send data to UDP socket
and gettimeofday() system call to obtain the system clock. This way Iperf
client obtains how long it took it to send a given amount of data and figures
out the rate. Iperf client is not able to detect if actual data rate put onto
wire was less for example because of policer or packet loss configured with tc.
Is such behavior a bug? If not, then under which conditions Iperf client in UDP
mode sends less data than specified with --bandwidth option?
I am using Debian GNU/Linux 7 as a guest-OS in VMware virtual-machine(1GigE
vNIC, e1000 driver), kernel 3.2.0-4-686-pae, libc6:i386 version 2.13-38+deb7u3,
libgcc1:i386 version 1:4.7.2-5 and libstdc++6:i386 version 4.7.2-5.
Please let me know in case additional information is needed!
thanks,
Martin Tonusoo
--------------------------
LINXTELECOM
www.linxtelecom.com
--------------------------
NOC 24/7: +372 622 3300
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]