# Calculate file transfer



## Hieronymus (Jan 24, 2007)

Could someone just to say how to calculate a file transfer on Ethernet? ex.: Ethernet (100Mb/s) and 1 file (400M), time = 400M / 100Mb/s = 4s Is my formula right? 
It is right that Ethernet is 100Mbit/s and not 100Mbytes/s??
Sometimes aren't the bits very clear for me?


Thanks in advance,
nymus


----------



## johnpost (Dec 18, 2005)

transfer speeds are bits/second

file size is most frequently done in bytes

so 400 MB is 3200 bits at 8 bits per byte


----------



## cwwozniak (Nov 29, 2005)

johnpost said:


> transfer speeds are bits/second
> file size is most frequently done in bytes


There are two additional factors to consider.

1) File sizes are typically specified in binary terms where 1 MB = 1,048,576 Bytes. A 400 MB file would be 419,430,400 Bytes in size.

2) There are additional bytes added to each packet of data sent to provide error detection and routing information. The actual numbers depend on the packet size and exact protocol used for sending them. In general terms, a typical packet of data sent will be about 95% or less content and 5% or a bit more of overhead. In order to send 419,430,400 Bytes of data about 441,505,684 bytes would actually need to be transmitted.

A 100 MegaBITs/Sec speed works out to a 12.5 MegaBYTEs/Sec transfer rate. Your 400 MB file would take about 35.3 seconds to send, assuming the source can continuously send it that fast, the receiving computer can process it that fast and there no large amounts of corrupted or lost packets that need to be resent.


----------



## JohnWill (Oct 19, 2002)

In truth framing and protocol overhead are probably a lot more than 5%. Here's a paper on SMB protocol: http://www.advance7.com/downloads/WhitePaper-LMBLatency.pdf


----------



## cwwozniak (Nov 29, 2005)

JohnWill said:


> Here's a paper on SMB protocol:[/url]


I wasn't even thinking about Windows adding another protocol layer on top of TCP/IP.  I was just going by some of the numbers for Ethernet on this site:

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


----------



## JohnWill (Oct 19, 2002)

Oh, there's lots more overhead than that!


----------



## Courtneyc (Dec 7, 2003)

Windows does not add another protocol layer on top of TCP/IP. TCP/IP does that all by itself. 

Keep in mind, there are a lot of things TCP has to keep track of. Your packets have to be numbered, ordered, and put in a window. That window has to be numbered and ordered. Keep in mind that the packet itself has to fit on every device it comes in contact with. If it doesn't, that packet has to be fragmented, numbered, and ordered. TCP has to keep track of this at every single connection. On top of that, some packets will get corrupted on the way to you. Those have to be resent from the source. 

Also, keep in mind, your connection is only as fast as your slowest connection. If you have a terebyte connection to the Internet, but your server is at 10 meg, your entire connection is only 10 meg (minus overhead).

In short, Windows does not add a protocol on top of TCP/IP (and keep in mind, it's the TCP that adds most of the overhead). 

(Windows can add NetBIOS or WINS on top of TCP/IP, but both are used to find the destination, not to send to it.)

Courtney sends...


----------



## O111111O (Aug 27, 2005)

Windows SMB PDU's into Ethernet framing is innefficient and lessens the ability to "fill the wire"

Nominally on low latent connections you will see 6-8Mbytes per second for 100Mbit Ethernet windows file transfers. Low latent means less than 5ms RTT for ack packets. Windows SMB does a poor job of increasing the size of SMB payload, (as the whtiepaper John posted points out) so very seldom is a >800byte PDU seen.


----------



## JohnWill (Oct 19, 2002)

Yep, I get around 8mb/sec between fast machines here.


----------



## Hieronymus (Jan 24, 2007)

Thanks guys for your help and papers  ?
Have someone a good link about bit and/or bytes?

Have a nice day
nymus


----------



## cwwozniak (Nov 29, 2005)

As good as any other source...

Byte: http://en.wikipedia.org/wiki/Byte

Bit: http://en.wikipedia.org/wiki/Bit


----------

