cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl/ download buffer size is different to upload buffer size.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 28 Jan 2015 16:11:27 +0100 (CET)

On Thu, 22 Jan 2015, Keonwoo Kim wrote:

> I'm using the curl-7.3.0 to upload and download file to openstack swift.

I think you meant something else. We never released any version called 7.3.0.

> very small file download is well operated. but when more size(1~100MB) file
> downloads, the size of receive buffer is about 1 KB (It is too small. I know
> that default buffer size is 16KB).

The receive buffer is always the same 16KB size unless you rebuild libcurl
with a custom size. And it doesn't matter how fast you download things,
libcurl uses the same buffer (size).

> it occurs timeout problem because write callback function is frequently
> called.

Is your write callback very slow? Cause otherwise it should not be a problem
that the callback is called often. libcurl reads as much as possible (into the
given buffer) and then sends it to the callback.

> When I used cURL command to download same file, file download speed is very
> fast..

And that uses the same buffer size which would rather indicate that the
problem you see is due to something your program is adding to the mix?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2015-01-28