Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the fastest way to transfer files over a network (FTP, HTTP, RSync, etc.) [closed]

Tags:

I'm trying to figure out the best way to transfer large amounts of data over a network between two systems. I am currently looking into either FTP, HTTP, or RSync, and I am wondering which one is the fastest. I've looked online for some answers and found the following sites:

  • http://daniel.haxx.se/docs/ftp-vs-http.html
  • http://www.isi.edu/lsam/publications/http-perf/

The problem is that these are old, and talk more about the theoretical differences between how the protocols communicate. I am more interested with actual benchmarks, that can say that for a specific setup, when transferring files of varying sizes one protocol is x% faster then the others.

Has anyone test these and posted the results somewhere?

like image 314
oneself Avatar asked Mar 14 '12 18:03

oneself


People also ask

What is faster FTP or rsync?

rsync optionally compresses its data. That typically makes the transfer go much faster.

Is FTP the fastest way to transfer files?

File Transfer Protocol (FTP), is the fastest but less secure. FTP doesn't use any encryption, so, it shares all data including authentication, in plain text. FTP is not recommended unless you are using it in an internal secure network.

Which protocol is fastest for file transfer?

FASP® – which standards for Fast, Adaptive, and Secure Protocol – is the fastest, most secure high-speed file transfer technology available today.

Why FTP is faster than HTTP?

Ultimately, FTP is more efficient at transferring large files, whereas HTTP is better for transferring smaller files such as web pages. Although both utilize TCP as the protocol of choice, HTTP uses a persistent connection, thus making the performance of the TCP better with HTTP than with FTP.


2 Answers

Alright, so I setup the following test:

  • Hardware: 2 desktops Intel Core Duo CPU @ 2.33GHz, with 4G of RAM.
  • OS: Ubuntu 11.10 on both machines
  • Network: 100Mb dedicated switch, both machines are connect to it.
  • Software:
    • Python HTTP server (inspired by this).
    • Python FTP server (inspired by this).
    • Python HTTP client (inspired by this).
    • Python FTP client (inspired by this).

I uploaded the following groups of files to each server:

  1. 1 100M file.
  2. 10 10M files.
  3. 100 1M files.
  4. 1,000 100K files.
  5. 10,000 10K files.

I got the following average results over multiple runs (numbers in seconds):

|-----------+---------+----------| | File Size | FTP (s) | HTTP (s) | |-----------+---------+----------| |      100M |       8 |        9 | |       10M |       8 |        9 | |        1M |       8 |        9 | |      100K |      14 |       12 | |       10K |      46 |       41 | |-----------+---------+----------|  

So, it seems that FTP is slightly faster in large files, and HTTP is a little faster in many small files. All in all, I think that they are comparable, and the server implementation is much more important then the protocol.

like image 77
oneself Avatar answered Nov 15 '22 11:11

oneself


If the machines at each end are reasonably powerful (ie not netbooks, NAS boxes, toasters, etc), then I would expect all protocols which work over TCP to be much the same speed at transferring bulk data. The application protocol's job is really just to fill a buffer for TCP to transfer, so as long as they can keep it full, TCP will set the pace.

Protocols which do compression or encryption may bottleneck at the CPU on less powerful machines. My netbook does FTP much faster than SCP.

rsync does clever things to transmit incremental changes quickly, but for bulk transfers it has no advantage over dumber protocols.

like image 32
Tom Anderson Avatar answered Nov 15 '22 11:11

Tom Anderson