3

In windows, I have transferred a data file (8GB) with sftp and scp (secure copy protocol) and get result like this:

Link speed is 1000 Mbps

I'm getting this data from Wireshark filter by SSHv2 Protocol

and calculated throughput = data size/time(sec)

this is throughput of both protocol

I'm a newbie in networking. I don't know what makes the throughput of these protocols different? I think this is not about interactive and non-interactive, because in debugging file, I seen command line during transferring file are same. Can anyone explain this to me?

Jakuje
  • 24,773
  • 12
  • 69
  • 75
T2terBKK
  • 319
  • 5
  • 12

1 Answers1

2

Both of the protocols are based on SSH. And SSH itself has some overhead: wiki

SCP is really naive protocol with really naive algorithm for transferring a few of small files. It has a lot of synchronization (RTT - Round Trip Time) and small buffers (basically 2048 B -- source).

SFTP on the other side more advanced and more ready for transferring files. It has bigger buffers which decreases need for synchronization and increases speed. I guess you would achieve similar results with rsync, which is probably the most appropriate tool to transfer data. Buffer has by default 32 768 B = 32 kB, but it is configured on commandline using -B switch.

Jakuje
  • 24,773
  • 12
  • 69
  • 75