Why is rsync 2x faster than sftp?
I'm transferring huge files, over a network to a destination server, totaling ~ 67 GB with individual zip files of size ~ 7GB. I tried copying to the destination using both sftp
and rsync
. rsync
performs (2x) faster copying than sftp
. sftp
was achieving around 700 kbps while rsync
transfers the data at a rate north of 1.4 Mbps. I know that SFTP and SCP uses the same SSH connection for transferring files. So, does this imply rsync
is much (2x) faster than SCP which uses SSH under the hood?
Or above all, is there an even faster way to transfer (such huge) files over a network?
P.S.: I'm transferring completely new data to the destination server with the following rsync
command:
rsync --info=progress2 -az source_folder username@destination_server:/location/
Or above all, is there an even faster way to transfer (such huge) files over a network?
You can speed up scp with
scp -p -C -o 'CompressionLevel 9' -o 'IPQoS throughput' -c arcfour machine:file .
I saw up to 5 times better speed using scp but of course external factors play a big role here.