This project is read-only.

SCP upload speed

Oct 28, 2014 at 9:14 AM
Comparing WinSCP Upload speed and SSH.Net upload speed (over a WiFi connection, but same external conditions and repeated a few times):

WinSCP 1.3MB/s 0.4MB/s

(I saw a similar speed with sharpssh, that I recently replaced due to the debugging of problems taking longer and longer and being more and more unsuccessful.)

Download speed generally seemed fine at 1MB/s+ with the same setup.

Is there something I can do to tweak this?
Nov 4, 2014 at 7:26 PM
What version of SSH.NET are you using ?
Performance of SftpClient has improved substantially in the latest beta release.

PS. I know the beta is dated, but there'll be a new beta release soon.
Nov 6, 2014 at 8:34 AM
I am using
as downloaded from download page.
I still have the feeling it is a lot faster (50%+) compared to Tamir.ssh, which already is helpful.
I have to transfer files of ~50MB, here you can already notice any speed difference.
Nov 6, 2014 at 8:34 PM
What is your input stream reading from ? It is a local file ?
There's still an issue in UploadFile where our buffer size is automatically reduce to the size of the last read.

Assume we start with a buffer size of 32 KB (this depends on SftpClient.BufferSize and the maximum packet size of the remote channel).
Now if we attempt to read 32 KB from the input stream, but the stream only provide 1 KB.
Then we'll adjust the buffer size we use to 1 KB, which means that for the next "chunk" we'll only attempt to read 1 KB (instead of 32 KB).
I'm not saying that you're running into this, but it's worth considering.

There are still other performance optimizations possible in UploadFile, but I haven't had time yet.

As always:
It help me a lot if you could reproduce this using a public SSH server, or if you could grant me access to the server you're using (but I understand this is hard to sell).
Nov 12, 2014 at 5:47 PM
Thanks a lot for input!
Input stream is a networked file (100MBit/s, LAN), also, it is a single 30MB file.
Unfortunately, cannot make the server available. :)
Nov 12, 2014 at 8:48 PM
Can you check whether the upload speed improves a lot when you use a local input file of the same size ?
Do you happen to know which SSH server software (and which version) you use ?
Nov 13, 2014 at 8:16 AM
There seems to be not a large difference between local copy and copy from network share.
Though, since now (because of your questions :) ) I have repeated and looked at the speed as well, it looks like every single copy got faster.
Today I am getting close to 0.8MB/s, perhaps because the file is also already buffered in PC memory?!

Also, I dont know if WiFi status has an influence on this, so I tested with WinSCP again and got 1.5MB/s on exactly the same file (local copy to same remote location).

About the SSH server:
when I do telnet localhost 22 (only way I could get any info with my linux knowledge) I see: SSH-2.0-dropbear_0.52

Many thanks for looking into this!