cURL / Mailing Lists / curl-library / Single Mail


RE: Multi Interface

From: Peter Thiess <>
Date: Wed, 13 Aug 2008 10:20:43 +0100

Hi Daniel,

Thank you very much for your immediate reply. We're using libcurl
version 7.18.2. Please find logged information attached.

I'm a bit surprised that the multi interface wouldn't be able to enhance
transfer rates since this could increase bandwidth.

 Best regards,

-- Peter

-----Original Message-----
[] On Behalf Of Daniel Stenberg
Sent: Dienstag, 12. August 2008 23:26
To: libcurl development
Cc: Andreas Wurf
Subject: Re: Multi Interface

On Tue, 12 Aug 2008, Peter Thiess wrote:

> We're investigating the multi interface provided by libcurl to enhance

> transfer rates.

I don't think the multi interface will improve your transfer rates in
significant way compared to the easy interface...

> We used the examples we found to upload a number of files to one
> each file is related to an easy_handle. We observe that a huge number
> connections are opened each with its own control and data channel.

> After a short while a significant number of connections drop after

You mean failure as in a libcurl bug/misbehavior?

> 1.) Is there a way to limit the number of connections?

Yes, curl_multi_setopt()'s CURLMOPT_MAXCONNECTS option.

> 2.) Is there a way to open one control channel with a number of
> data channels while transferring to one server?

No. The control connection will be held "captive" while the data is
transfered, so if you want to re-use the control connection - without
a new one to get made - you need to wait for the previous request to end


> 3.) Would a handle pool be an appropriate approach?

That's often what people end up doing, but in recent libcurls the
cache is held within the multi handle anyway so the creating and
deleting of
easy handles is a very cheap operation that doesn't really hamper
Of course, with a pool style approach you can avoid a few malloc/free

> 4.) Are the errors we observe forced by the way we used the multi
> or are these likely server related issues?

I would need to get more details to be able to tell. Also you didn't
what libcurl version you're using.


Received on 2008-08-13