Tuesday, March 16, 2010

Musing:How Long Does It Take to Transfer Data ? Rules of Thumb

February 3, 2009 by Greg Ferro · 11 Comments 

When it comes trans­fer­ring large files or data sets ( say big­ger than 10 Gigabytes), many people for­get that the trans­fer time becomes sig­ni­fic­ant.

Transferring of a 20 GB file

Let’s say that you are trans­fer­ring a 20 Gigabyte file over an Internet or intersite con­nec­tion with band­width that is less than Gigabit. (If you are meas­ur­ing inter­act­ive traffic flows you need another technique).

20 000 Megabytes * 8 bits per byte * 1 000 000 bits per Megabyte= 160 000 000 000 bits

When we pack this raw data into a TCP/​IP packet (e,.g L3 packet head­ers and L2 fram­ing) the data set will expand by about 40% (that is my rule of thumb).

160 000 000 000 bits plus 40% encod­ing over­head = 224 000 000 000 bits of net­work data.

If you can trans­fer this data (without encryp­tion) at, say, 10 mega­bits per second:

224 000 000 000 bits /​ 10 000 000 bits per second = 22400 seconds = 373 minutes.

So we can expect the trans­fer at 10 Mbps to take around six hours (give or take a bit). Transferring the file at 100Mbps will take about 35 minutes.

full-duplex-faster-2.jpg

Impact of Latency

This cal­cu­la­tion is a best case and assumes that:

  • there is no packet loss, and thus no retransmissions
  • that there is no sig­ni­fic­ant latency in the trans­mis­sion path

Application Latency is the time taken for a data to pass from the applic­a­tion, propag­ate from A to B, and then be acknow­ledged from B to A, and be handed to Application to release the API data buffer.

full-duplex-faster-1.jpg

Latency Rules of Thumb

My rule of thumb for cir­cuits between 1 to 10 Megabits per second is to reduce the through­put by another 10 to 15% for intra-​​continental traffic, and 20 to 25% for Major eco­nom­ies in the north­ern hemi­sphere( UK, Europe, US), add more for the old Eastern Bloc and emer­ging coun­tries (such as Turkey). Think hard and make your own choices for longer dis­tances such as Australia, Japan, China etc.

Encryption Inflation

Remember that adding encryp­tion (IPSec or SSL) will fur­ther inflate the amount of trans­ferred data. The actual impact will depend a lot on aver­age packet size. IPSec typ­ic­ally add 40 bytes to the header, which has less impact for a large data trans­fer with an MTU of 1350 bytes that for an inter­act­ive ses­sion exchan­ging pack­ets with an MTU of of 400 bytes.

Often for­got­ten is the encryp­tion and decryp­tion delay that makes teh trans­fer more latent.

Rule of Thumb: add another 10 to 15% if you choose to encrypt the transfer.

Worst Case

So com­ing back to our ori­ginal plan.

224 000 000 000 bits /​ 10 000 000 bits per second = 22400 seconds = 373 minutes.

Add 20% for the UK to US data transfer.

Add 10% for Encrypting into IPsec tunnel.

373 minutes * 20% * 10% = 492 minutes.

Now our chart looks more like this:

full-duplex-faster-3.jpg

Wrapping it up

These rules of thumb are import­ant because these are what you use in a design meet­ing before the idea turns into a pro­ject. You can save days of work by know­ing rough num­bers in advance. When the pony-​​tailed Unix Admin at the meet­ing cas­u­ally throws out “and trans­fer the 20GB tile images using the VPN to China” you can do some quick num­bers and instantly ask for another £250K for WAN upgrades (which of course will put that bright idea into the bin).

Near enough is usu­ally good enough — Etherealmind.

Postscript

Not that these cal­cu­la­tions are for file trans­fers which is easier to define. Trying cal­cu­late 20 GB of inter­act­ive traffic is much more dif­fi­cult because the under­ly­ing con­di­tion is inde­term­in­ate. Beware.

The best pos­sible net­work per­form­ance is achieved when the net­work pipe between the sender and the receiver is kept full of data, that is, the ‘in-​​flight bytes’ is set to the max­imum that a sender and receiver can buf­fer before an acknow­ledge­ment is issued. This ‘should’ occur when trans­fer­ring a large file and thus issues such as BDP and TCP Windowing are not really relevant.

Please rate this post:

  Why Rate Posts?
1 Star - It\\\'s Crud2 Stars - It\\\'s Tosh3 Stars - Something\\\'s missing4 Stars - Needs works5 Stars - Good Enough6 Stars - Good7 Stars - Excellent8 Stars - Brilliant9 Stars - Astonishing10 Stars - Awesomely Godlike? (No Ratings Yet)
Loading ... Loading ...

Comments

11 Responses to “Musing:How Long Does It Take to Transfer Data ? Rules of Thumb”
  1. JohnH says:

    Great post Greg. You should really men­tion the impact of the Bandwidth Delay Product at higher band­widths and laten­cies. If win­dow scal­ing isn’t sup­por­ted end-​​to-​​end your effect­ive through­put can be hobbled by the TCP limit on the num­ber of bytes that can be on the wire at any one time.

    • Greg Ferro says:

      Yeah, BDP has an impact on the “in-​​flight bytes” and there are vari­ous WAN accel­er­a­tion products that play with TCP Window, TCP MSS & BDP to imp

    • Greg Ferro says:

      Yeah, BDP has an impact on the “in-​​flight bytes” and there are vari­ous WAN accel­er­a­tion products that play with TCP Window, TCP MSS & BDP to improve TCP pro­tocol per­form­ance (and other things of course). I haven’t spent a lot of time on WAN Acceleration, but for a ‘rough guess’ these num­bers are a good start, I think. I will research it though and see if it worth some more writing.

  2. James Lewis says:

    This is really help­ful Greg. I work in the file trans­fer industry and whilst the sup­ply of the product is gen­er­ally quite straight­for­ward its always a little more dif­fi­cult help­ing cus­tom­ers to under­stand the implic­a­tions of their Internet con­nectiv­ity and what band­width they should pro­vi­sion for. I’ll be point­ing cus­tom­ers in your gen­eral dir­ec­tion. Thanks!

  3. Harold says:

    Greg, isn’t import­ant to men­tion the TCP win­dow size for the case exposed above? I’ve heard that it’s the only thing that mat­ters in cases where TCP plays, regard­less of the line rate.

    • Greg Ferro says:

      My exper­i­ence is little bit dif­fer­ent, and I am really only try­ing to lay out some rules of thumb. Let me do a little bit of research and I will come back to you.

    • Greg Ferro says:

      Nice! However the Google cal­cu­la­tion doesn’t account for the encap­su­la­tion of data into Layer 2 frames and Layer 3 pack­ets. That is, 1 Megabit of data becomes, roughly, 1.4 Megabits when sent over the Internet.

  4. Brad Hedlund says:

    Greg,
    Nice post and graph­ics but you lost me at your last para­graph which seems to imply that a large file trans­fer “should” just fill the pipe without con­cern for TCP Windowing.

    With latency, TCP Windowing is a crit­ical factor to file trans­fer per­form­ance, regard­less of file size and bandwidth.

    Brad

Trackbacks

Check out what others are saying about this post...
  1. […] from me. So a “Mark Johnson — makr3​2​4​@​hotmail.​com” — posts a com­ment on my art­icle on How Long it Takes to trans­fer data : “This is the exact prob­lem my com­pany faced about 6 months ago. We actu­ally looked at WAN […]



Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!