From: Marc H. <Mar...@fr...> - 2009-11-02 09:03:23
|
2009/11/2 Frank Schuster <fra...@we...>: > thank you for your response. I think for TCP (and I think SCTP) you are right. > But I tried this for UDP with the "-i 1" option and I get reports to every second. > I sniffer the packets from and to the server via wireshark and there is only one packet after 10 sec from server to the client. > How is it there possible that the Client can calculate the correct bandwidth every second, because it get no ACKs or something else? iperf knows only what the operating system tells it, so the answer to this question does not depend on iperf but on the operating system. For both UDP and TCP what the sending side reports is what has been sent, NOT what has been received. So it can differ between the sending and receiving side. But for TCP it cannot differ for long, because in case of a network problem the TCP socket buffer on the sending side will fill up and eventually block the sender. To verify all this simply unplug the network cable during a test. Be careful to unplug the cable of the *receiving* side, because some operating systems on the sending side will brutally close all sockets and indirectly interrupt iperf (not even giving you a chance to plug the cable back). You can also try to change the socket buffer size using the "-w" option. I think there is also some additional iperf magic handshake at the end of the test, not sure. The source code is your friend here. Cheers, Marc |