curl-library
Re: sftp and buffersize
Date: Mon, 17 Oct 2011 16:33:46 +0200 (CEST)
On Mon, 17 Oct 2011, Jonas Schnelli wrote:
> I try to improve the poor SFTP speed of libssh2 and the whole SFTP design.
Are you using libssh2 1.3.0 or directly off git? Do you have poor speeds when
using libssh2 directly or only when using it with libcurl?
> How can i change the buffersize loaded via the CURLOPT_READFUNCTION
> callback? The CURLOPT_BUFFERSIZE option only has affect on writing
> callbacks.
The primary problem for SFTP with libcurl here is that libcurl doesn't let you
grow the buffer size before its internally set size. A 16K buffer is MUCH too
small for really efficient SFTP transfer speeds when the RTT to the server is
larger than just a few milliseconds.
> Any other ideas how to improve the SFTP speed?
Apart from enlarging the buffer size (a lot), making the buffer use "slide" as
in the sftp_write_sliding.c libssh2 example will take the performance
further..
There are other things that could possibly be done, but they would need to be
done to libssh2.
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2011-10-17