I ran a quick SFTP performance test with #curl built to use #libssh 0.11.1 vs one built that uses #libssh2 1.11.1 over a 400ms latency connection.
One of them managed to perform this at 1049K/sec, the other reached only 249K/sec.
And the winner is...
libssh2
Funny detail: I sped it up for this kind of use case **fifteen years ago** and blogged about it: daniel.haxx.se/blog/2010/12/08…
Making SFTP transfers fast
SFTP, the SSH File Transfer Protocol, is a misleading name. It gives you the impression that it might be something like a secure version of FTP, perhaps something like FTPS but modeled over SSH instead of SSL.daniel.haxx.se
Frank Gevaerts
in reply to daniel:// stenberg:// • • •Sara Golemon
in reply to daniel:// stenberg:// • • •daniel:// stenberg://
in reply to Sara Golemon • • •Andreas Schneider
in reply to daniel:// stenberg:// • • •Does curl use the SFTP AIO API? I guess the answer is NO ...
api.libssh.org/stable/libssh_t…
libssh: Chapter 10: The SFTP asynchronous I/O
api.libssh.orgAndreas Schneider
in reply to Andreas Schneider • • •The SFTP AIO API is only used for uploading files: github.com/curl/curl/commit/8b…
You tested downloading?
libssh: use libssh sftp_aio to upload file · curl/curl@8b25949
GitHubAris Adamantiadis 💲Paid
in reply to Andreas Schneider • • •daniel:// stenberg://
in reply to Aris Adamantiadis 💲Paid • • •I compared sftp downloading again yesterday, and with high latency connections libssh2 is typically around 4 times faster than libssh with curl.
and OpenSSH's sftp is much faster than curl using either library
daniel:// stenberg://
in reply to daniel:// stenberg:// • • •Andreas Schneider
in reply to daniel:// stenberg:// • • •daniel:// stenberg://
in reply to Andreas Schneider • • •Andreas Schneider
in reply to daniel:// stenberg:// • • •Aris Adamantiadis 💲Paid
in reply to Andreas Schneider • • •daniel:// stenberg://
in reply to Aris Adamantiadis 💲Paid • • •@aris @cryptomilk I went down this rabbit hole after a customer reported performance problems using sftp. And they use a curl built with libssh.
Not saying switching to libssh2 would be an improvement enough for them though.