cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Performance Problem with CURL.

From: Cory Nelson <phrosty_at_gmail.com>
Date: Thu, 25 Aug 2005 06:43:58 -0700

libcurl (or anything else using select) probably isn't the best choice
for benchmarking, but i do see one major flaw:

dev_null() printing stuff out will be a major drain on performance,
especially with that endl flushing the stream... consider having it
just return size*nmemb. if you must print something, make a static
variable and only print when (++var%500) == 0.

On 8/25/05, Martin Vogt <vogt_at_itwm.fraunhofer.de> wrote:
>
> Hello,
>
> I'm developing a benchmark with curl-7.10.5.
> Attached is my first source. (only a test so far)
>
> If I use the testprogram with IIS it takes only 0.7 Seconds
> with 1000 request, but when used against apache2 it take from 5 to 19
> seconds.
>
> If I use /usr/sbin/ab2 -c 1000 /url/to/a.jpg IIS has the
> same time, but apache now only takes 0.4 seconds.
> (ab2 is the apache2 benchmark, but for some reasons, I like to use libcurl)
>
> If I start my testprogram ist gives "timeouts", but only when
> used against apache2, not IIS.
> Its obvious thats a problem with my testprogram, so how can I get more
> performance with it?
>
> Thanks,
>
> Martin
>
>
>
>
>
>

-- 
Cory Nelson
http://www.int64.org
Received on 2005-08-25