cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: very slow sftp download speed

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 24 Apr 2014 18:50:07 +0200

On Thu, Apr 24, 2014 at 09:15:37AM -0700, Michael Zhang wrote:
> Thank you very much for your explanation. Can the buffer size in
> libcurl be changed by any settings externally? If not, Can I try to
> modify this buffer size in libcurl source code and recompile it to
> get a new version of libcurl?

You should be able to configure libcurl with something like
CPPFLAGS=-DCURL_MAX_WRITE_SIZE=4194304 to have it use a 4 MiB buffer.
That should be enough to improve things.

> On the top of libcurl, there is one more level- libssh2. Does it also
> have any buffer size issue?

No, recent versions have greatly improved the internals so it's now
competitive with other ssh clients when used correctly.

> 50% of speed loss will be acceptable if sftp is compared to ftp. We
> really need to improve sftp download speed to make it w

There was a thread in the libssh2 mailing list with some performance figures
when the improvements were made a year or two ago. libssh2 should no longer
be a bottleneck. I don't recall if anything was published for libcurl with
a newer libssh2 and a larger buffer size.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-04-24