curl / Mailing Lists / curl-library / Single Mail


Re: Windows users! Help us test upload performance tuning?

From: Daniel Jeliński via curl-library <>
Date: Thu, 9 Aug 2018 09:01:00 +0200

2018-08-09 1:42 GMT+02:00 Gisle Vanem via curl-library
> I also just tested with 'curl sftp//:' with the latest libssh2
> and the new 'SIO_IDEAL_SEND_BACKLOG_QUERY' option. 'sftp://' is
> still 6 times slower than ftp against the same server in Denmark.
> 33.153s vs 5.4s for a 10 MByte file.

There's no way for curl/libssh2 to put more than 16 KB on the wire.
It's right there in libssh2 docs [1]: [libssh2_sftp_write] will return
a positive number as soon as the first packet is acknowledged from the

Since sftp packets are up to 32 KB, and curl is using 16KB send
buffer, the buffer always fits in one packet and the function always
waits for acknowledgement before returning. So your transfer rate will
never exceed 16 KB / ping.

It seems relatively easy to change the procedure to get rid of this
write-through semantics. Not sure if the project is still actively
maintained though, its mailing list [2] looks very quiet.

I didn't check curl with libssh backend, it may be worth a try.

Received on 2018-08-09