cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: thread pooling

From: vick <vijayx_at_gmail.com>
Date: Sat, 13 Feb 2010 18:27:27 +0530

if you make one multi-handle for each processor, you are still not
having a way to use a pool of free threads/processors because you
could be busy as hell on one proc, but the other one empty. basically
i am thinking some kind of balancing and the multi handle has to work
across processors.

From: Daniel Stenberg <daniel_at_haxx.se>
To: libcurl development <curl-library_at_cool.haxx.se>
Subject: Re: thread pooling
Message-ID: <alpine.DEB.2.00.1002122008080.12881_at_tvnag.unkk.fr>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Fri, 12 Feb 2010, vick wrote:

>> suppose i want to do async i/o with pooled threads. i create as many threads
>> as there are processors. Basically would like curl multi to take advantage
>> of multiple processors and complete operations on each of them. but as curl
>> is not thread aware, wondering how that is possible.

>Make one multi handle for each CPU and run the multi_socket API on each and
>you'll get maximum performance. I think.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-02-13