cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: very slow sftp download speed

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 24 Apr 2014 11:13:19 +0200 (CEST)

On Wed, 23 Apr 2014, Michael Zhang wrote:

> I did a test today with Curl 7.36.0 and a sftp server and found one issue.
> Although Curl is able to download small files from the server via sftp, its
> downloading speed for larger files such as 6.6GB is really slow. I did a
> comparison between sftp and ftp.

Yes, this is a known problem/flaw with curl and libcurl doing SFTP. I've
repeated it many times but I guess I've not made a very good job of explaining
in detail why and what needs to be done so I'll try to do that and blog
something about it later on.

The primary reason is that SFTP is a funny protocol. To work around that
dilemma, a (much) larger buffer is necessary to use, but libcurl only uses a
fixed-size fairly small one that is the same for all protocols.

This is a solvable problem but I've not yet seen anyone really interested in
fixing it.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
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