Re: How is bandwidth calculated?
There is no way to have Iperf determine the header size of packets (or any
other program or OS). It is true that the OS can determine the size of the
packet that leaves the NIC, but once it is on the network there is no
telling if it gets fragmented (thus increasing header size) or switches
topologies (thus changing link layer header size) or any other of a number
of things. Iperf is also designed to test "goodput" or the amount of
usable data between two hosts so headers are not included. It is up to the
user to know how big the headers are (transport down to link) and
calculate the additional data that is sent across a link if that is their
intent. Using web100 extensions (www.web100.org) you can get more data on
TCP connects to allow for estimates on data. Otherwise you can use NIC
counters provided by OS (*nix ifconfig will show such counters) or by
network components. Enjoy.
PS the number calculated for speed corresponds to a time of 5.0037
seconds. The numbers are shown in more user friendly lengths but the speed
does correspond to the data sent.
On Tue, 17 Jun 2003, Terje Krogdahl wrote:
> On Tue, Jun 17, 2003 at 12:04:01PM +0200, Terje Krogdahl wrote:
> > However, on the wire data is transmitted with the headers, so it
> > should really be 2128 packets * 1498 bytes = 3187744, which becomes
> > 3187744*8/5 = 5100390 bits/sec. Should there be an option to print the
> > data including headers? This concerns me, since I'm using iperf to test
> > network hardware.
> BTW, does the same apply to headers for TCP streams? I.e., the
> bandwidth is calculated *without* the headers? In that case, is there
> an easy way of figuring out how many packets were used, so that the
> overhead can be added manually?