Hi,

if one executes for example "iperf -c 178.62.60.141 -fm -b 100m -u -t
30 -i 10", then after each 10 second interval Iperf client prints out
the amount of data it has transferred in mebibytes:

root@vserver:~# iperf -c 178.62.60.141 -fm -b 100m -u -t 30 -i 10
WARNING: option -b implies udp testing
------------------------------------------------------------
Client connecting to 178.62.60.141, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size: 0.22 MByte (default)
------------------------------------------------------------
[  3] local 146.185.187.148 port 37660 connected with 178.62.60.141 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   119 MBytes   100 Mbits/sec
[  3] 10.0-20.0 sec   119 MBytes   100 Mbits/sec
[  3] 20.0-30.0 sec   119 MBytes   100 Mbits/sec
[  3]  0.0-30.0 sec   358 MBytes   100 Mbits/sec
[  3] Sent 255661 datagrams

Same is true for TCP. Fact, that transferred data and bandwidth are
printed out after the end of each interval and transferred data is
sometimes bit more or less than the bandwidth specified with the "-b"
flag, should mean that Iperf client actually somehow counts the sent
data and doesn't just print the argument of "-b" flag. Still, how does
Iperf client count the amount of data it sends? It sure doesn't do
this on some low level because if I introduce 10% packet loss with tc,
execute "iperf -c 178.62.60.141 -fm -b 100m -u -t 30 -i 10" and then
compare the packets Iperf client thought it sent(from Iperf client
output) with the amount of packets actually were put to wire(from "ip
-s link show dev eth0" output), then Iperf client thought that it sent
>250k datagrams while it actually did just bit over 230k. Exactly the
same holds true if I police the traffic with tc Token Bucket Filter
queuing discipline, i.e. according to Iperf client it has sent out
traffic at 100Mbps while actual traffic rate was policed by policer.

How does Iperf 2.x client detect the amount of traffic it has sent?
Does Iperf client simply count the packets it has passed to Linux
network stack? Could somebody point me to the place in source-code
where this takes place?



thanks,
Martin

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Iperf-users mailing list
Iperf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iperf-users

Reply via email to