10th February 2012

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

When it comes transferring large files or data sets ( say bigger than 10 Gigabytes), many people forget that the transfer time becomes significant.

Transferring of a 20 GB file

Let’s say that you are transferring a 20 Gigabyte file over an Internet or intersite connection with bandwidth that is less than Gigabit. (If you are measuring interactive 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 headers and L2 framing) the data set will expand by about 40% (that is my rule of thumb).

160 000 000 000 bits plus 40% encoding overhead = 224 000 000 000 bits of network data.

If you can transfer this data (without encryption) at, say, 10 megabits per second:

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

So we can expect the transfer 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 calculation is a best case and assumes that:

  • there is no packet loss, and thus no retransmissions
  • that there is no significant latency in the transmission path

Application Latency is the time taken for a data to pass from the application, propagate from A to B, and then be acknowledged 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 circuits between 1 to 10 Megabits per second is to reduce the throughput by another 10 to 15% for intra-continental traffic, and 20 to 25% for Major economies in the northern hemisphere( UK, Europe, US), add more for the old Eastern Bloc and emerging countries (such as Turkey). Think hard and make your own choices for longer distances such as Australia, Japan, China etc.

Encryption Inflation

Remember that adding encryption (IPSec or SSL) will further inflate the amount of transferred data. The actual impact will depend a lot on average packet size. IPSec typically add 40 bytes to the header, which has less impact for a large data transfer with an MTU of 1350 bytes that for an interactive session exchanging packets with an MTU of of 400 bytes.

Often forgotten is the encryption and decryption delay that makes teh transfer more latent.

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

Worst Case

So coming back to our original 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 important because these are what you use in a design meeting before the idea turns into a project. You can save days of work by knowing rough numbers in advance. When the pony-tailed Unix Admin at the meeting casually throws out “and transfer the 20GB tile images using the VPN to China” you can do some quick numbers and instantly ask for another £250K for WAN upgrades (which of course will put that bright idea into the bin).

Near enough is usually good enough – Etherealmind.

Postscript

Not that these calculations are for file transfers which is easier to define. Trying calculate 20 GB of interactive traffic is much more difficult because the underlying condition is indeterminate. Beware.

The best possible network performance is achieved when the network pipe between the sender and the receiver is kept full of data, that is, the ‘in-flight bytes’ is set to the maximum that a sender and receiver can buffer before an acknowledgement is issued. This ‘should’ occur when transferring a large file and thus issues such as BDP and TCP Windowing are not really relevant.

This post is copyright of Thropos Ltd ©2008-2011 at Etherealmind.com - contact | email: greg.ferro@packetpushers.net - twitter: @etherealmind | All rights reserved
About Greg Ferro

Greg Ferro is a Network Engineer/Architect, mostly focussed on Data Centre, Security Infrastructure, and recently Virtualization. He has over 20 years in IT, in wide range of employers working as a freelance consultant including Finance, Service Providers and Online Companies. He is CCIE#6920 and has a few ideas about the world, but not enough to really count.

He is a host on the Packet Pushers Podcast, blogger at EtherealMind.com and on Twitter @etherealmind and Google Plus

  • JohnH

    Great post Greg. You should really mention the impact of the Bandwidth Delay Product at higher bandwidths and latencies. If window scaling isn’t supported end-to-end your effective throughput can be hobbled by the TCP limit on the number of bytes that can be on the wire at any one time.

    • http://etherealmind.com Greg Ferro

      Yeah, BDP has an impact on the “in-flight bytes” and there are various WAN acceleration products that play with TCP Window, TCP MSS & BDP to imp

    • http://etherealmind.com Greg Ferro

      Yeah, BDP has an impact on the “in-flight bytes” and there are various WAN acceleration products that play with TCP Window, TCP MSS & BDP to improve TCP protocol performance (and other things of course). I haven’t spent a lot of time on WAN Acceleration, but for a ‘rough guess’ these numbers are a good start, I think. I will research it though and see if it worth some more writing.

  • http://www.pro2col.com James Lewis

    This is really helpful Greg. I work in the file transfer industry and whilst the supply of the product is generally quite straightforward its always a little more difficult helping customers to understand the implications of their Internet connectivity and what bandwidth they should provision for. I’ll be pointing customers in your general direction. Thanks!

  • Harold

    Greg, isn’t important to mention the TCP window size for the case exposed above? I’ve heard that it’s the only thing that matters in cases where TCP plays, regardless of the line rate.

    • http://etherealmind.com Greg Ferro

      My experience is little bit different, and I am really only trying to lay out some rules of thumb. Let me do a little bit of research and I will come back to you.

  • Pingback: File Catalyst:Unlimitech Software: Pretending to be a customer | My Etherealmind

  • Fredrik
    • http://etherealmind.com Greg Ferro

      Nice! However the Google calculation doesn’t account for the encapsulation of data into Layer 2 frames and Layer 3 packets. That is, 1 Megabit of data becomes, roughly, 1.4 Megabits when sent over the Internet.

  • http://www.internetworkexpert.org Brad Hedlund

    Greg,
    Nice post and graphics but you lost me at your last paragraph which seems to imply that a large file transfer “should” just fill the pipe without concern for TCP Windowing.

    With latency, TCP Windowing is a critical factor to file transfer performance, regardless of file size and bandwidth.

    Brad

    • http://etherealmind.com Greg Ferro

      Yeah, I sort of roughed it out with an estimate. I should do a followup on this and explain it a bit more fully. Might take a while.

      Greg