cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl vs wininet : how to tell (specify to) libcurl the amount (CHUNK) of data to download (CHUNK)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 15 Jan 2012 19:59:46 +0100 (CET)

On Sun, 15 Jan 2012, Saidus Bounderra wrote:

> Like i said : this is just for comparaison !! I write a simple test
> application that use libcurl to download a File with 360 MB size on
> localhost using apache webserver the speed is between 11MB/s and 12 MB/s
> then I configured Internet download manager (IDMan) witch uses wininet, to
> use ONE THREAD to download this file in the same conditions but his speed
> exceed 30MB/s (bettween (30 & 40 MB/s)) so I wonder why this difference.

So do I! I honestly can't think of any explanation for such a speed
difference.

> The first thing that comes to my mind is the RECEIVE BUFFER and the
> possibility to modify CURL_MAX_WRITE_SIZE.

Does it really? Why? A 16K buffer is perfectly capable of delivering MUCH
higher speeds of data in other circumstances so I don't think changing that is
needed.

>> Yes it does. You probably simply modified the wrong header or something.
>> The CURL_MAX_WRITE_SIZE define is the single place that defines the buffer
>> size
>
> the CURL_MAX_WRITE_SIZE define is located in curl.h header in
> /curl-7.23.1/include/curl/curl.h so I have modified this value to 100Kb {
> 1024 * 100 } then recompiled libcurl.dll after use, the amount of data
> downloaded for each call to Progression function is MAXIMUM = 16384 and
> never exceed that.

Right, and that indiciates you did something wrong as it seems unlikely it
would stick to 16K usage if it can use more and you're doing high speed
transfers. Don't you agree?

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