cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: sftp and buffersize

From: Jonas Schnelli <jonas.schnelli_at_include7.ch>
Date: Mon, 17 Oct 2011 17:12:59 +0200

> On Mon, 17 Oct 2011, Jonas Schnelli wrote:
>
>> 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?
>
> Set CURL_MAX_WRITE_SIZE to perhaps 100K or something and rebuild libcurl and see what difference it makes. It is defined in include/curl/curl.h

Thanks.

Just for the records:
changing the CURL_MAX_WRITE_SIZE to 128K had doubled upload speed on libssh2 1.3.0 on my setup.
changing the CURL_MAX_WRITE_SIZE to 512K i reach ~ my network max or - better say - the limits i get with openssh or other sftp clients-

setup: 32bit / intel
Network: 100MBit down / 8 MBit up

@daniel:
Is the CURL_MAX_WRITE_SIZE anyhow configurable? (you already said no, aren't you? :) )
Is it difficult to make the CURL_MAX_WRITE_SIZE anyhow configurable?

I would then try to change the CURL_MAX_WRITE_SIZE (of let's say the SFTP buffer size) dependent on the historical speed of the nework (or maybe also configurable by the enduser: like "select your internet connection type:").

Thanks

--
Jonas
> 
> -- 
> 
> / 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