Re: Header vs. data payload in bandwidth measurements


On Wed, 2 Jan 2008 19:02:44 -0500
"Daniel Pall" <dpall --at-- princeton.edu> wrote:

> I'm trying to use iperf with TCP to figure out the maximum bandwidth of a
> network I'm constructing.  Here is what I need to know: does iperf's results
> printout (E.g., "900 Mbits") encompass everything sent over the network
> (including TCP header, IP header, and data payload)? Or does iperf just
> measure the data payload bandwidth?
> 
> I guess another way to phrase the question is: Does iperf's bandwidth report
> take into account packet headers, or not?
> 
> Thanks,
> Dan


The report is actual bytes transfered:

ReportDefault.c::reporter_printstats()
	    byte_snprintf( &buffer[sizeof(buffer)/2], sizeof(buffer)/2,
                   stats->TotalLen / (stats->endTime - stats->startTime), 
                   stats->mFormat);

See http://sd.wareonearth.com/~phil/net/overhead/

TCP over Ethernet:
 Assuming no header compression (e.g. not PPP)
 Add 20 IPv4 header or 40 IPv6 header (no options)
 Add 20 TCP header
 Add 12 bytes optional TCP timestamps
 Max TCP Payload data rates over ethernet are thus:
  (1500-40)/(38+1500) = 94.9285 %  IPv4, minimal headers
  (1500-52)/(38+1500) = 94.1482 %  IPv4, TCP timestamps
  (1500-52)/(42+1500) = 93.9040 %  802.1q, IPv4, TCP timestamps
  (1500-60)/(38+1500) = 93.6281 %  IPv6, minimal headers
  (1500-72)/(38+1500) = 92.8479 %  IPv6, TCP timestamps
  (1500-72)/(42+1500) = 92.6070 %  802.1q, IPv6, ICP timestamps

-- 
Stephen Hemminger <stephen.hemminger --at-- vyatta.com>



Other Mailing lists | Author Index | Date Index | Subject Index | Thread Index