sftp transfer speed is different scp speed
Hello,
I am using your library version 0.8 for file transfer over sftp. However upload speed over sftp using sshj library does not match normal sftp file transfer.
if I transfer a file with ftp speed is 1Mb/s with sftp using sshj speed is 1Mb/s with sftp speed is 10Mb/s with scp speed is 10Mb/s with scp using sshj speed is 10Mb/s
What migth be the reason for differences? Thanks
Thanks for pointing out the speed difference. Comparing sshj speeds against openssh & ironing out any issues seems like a worthwhile exercise, I will try to get around to it soon.
I think that this low transfer speed is due to the fact that only one single part of a file is provided to / requested from the server at a time. By consequence, the latency between the server and the client impact dramaticaly the transfert speed.
I programmed a patch for ganymed ssh that fasten a lot the upload. It is easy to code for the upload but very hard for the download because of the java streams shape (writting lazily is easy but reading ahead of time is very hard). I will try to submit a patch for the uploading part.
The upload has been made a lot faster by merge pull request #97.
Speeding up the download using read ahead is however significantly harder.
I have written a patch to improve download transfer speeds in https://github.com/dkocher/sshj/commit/f354fd66615ddf70401e8a7191a15ffc4dd11f45
This merge does not exists in the latest mvn release 0.35.0. Currently the upload speed using RemoteFileOutputStream is VERY slow!