1

Closed

Scp slow copy

description

Hi,

I've been experimenting with the scp implementation and noticed it is slower compared to the command line tool scp. In my test, it is 5s to copy with scp, and 15s with SSH.NET. Is this expected? If not, what can I do to improve performance?

Thanks,
Manu
Closed Sep 17, 2016 at 7:32 AM by drieseng
Moved issue to GitHub.

comments

4I03F2lod wrote Jun 15, 2016 at 1:53 AM

My timing is actually wrong with the unmodified SSH.NET it takes by default 33s, and I noticed that most of the time it was stuck in a Thread.Sleep (100) in ScpClient.ReadByte, so I changed this to Thread.Sleep(0) and got the 15s.

drieseng wrote Jun 16, 2016 at 6:19 PM

You should get much better results with the SftpClient, but that's no excuse for the bad results with ScpClient.
Can you please submit an issue at https://github.com/sshnet/SSH.NET (we've moved!) ?

Thanks!
Gert

4I03F2lod wrote Jun 16, 2016 at 11:33 PM

Indeed I switched to sftp which provides a way to sync directories and is definitely much faster. I'll fill the issue over at github.

Thanks!

wrote Sep 17, 2016 at 7:32 AM