curl-library
Re: sftp and buffersize
Date: Mon, 17 Oct 2011 16:46:54 +0200
> 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?
1.3.0 stable.
>
>> 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.
But is there a chance to change the default 16K buffer to different value? Didn't found it straight away in the libcurl source.
I just wan't to play with the buffer size to see how's the improvement and then decide to keep or through out sftp support in my software (for now :) ).
Or can i somehow hack/change the buffersize in libcurls sftp.c?
>
>> 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.html
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
include7 AG
Jonas Schnelli
Grüngasse 10
CH-8004 Zürich
Switzerland
Office: +41 44 500 16 70
Skype: jonas.schnelli
Mail: jonas.schnelli_at_include7.ch
Web: www.include7.ch
V-Card: www.include7.ch/js.vcf
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
ACHTUNG
Bitte senden sie uns keine sensitiven Daten in unverschlüsselten E-Mails.
Verwenden Sie hierzu folgenden Link:
https://include7.ch/contact/secureform
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-10-17