SSH.NET
SSH.NET copied to clipboard
Low throughput for sFTP over high latency high bandwith network
Our client (that uses ssh.net) runs on AWS and the sftp server is hosted on Prem, and our uploads are multi-threaded. We use the default UploadFile() method, which through various tests seem to perform the best on this network.
We however are seeing that the performance is way below par when compared to the sftp command from openssh for a single thread. Like 3 times slower. And with multiple threads, it goes crazy slow, to the point that the total throughput from all the threads are lower than that it gets from a single thread.
OpenSSH's sftp command on the other hand scales quite well.
Open SSH has a patch called HPN-SSH for such networks, not sure if something can be inspired from that.
Further tests revealed that its not latency that is creating the problem but the fact that the network is an IPSEC VPN tunnel. Apparently, SSH.net fairs poorly over a VPN tunnel, 4 times slower, compared to sftp command of OpenSSH, and twice as slower using Winscp (the wrapper).