Boost logo

Boost :

Subject: Re: [boost] [threadpool] parallel_sort example
From: Edouard A. (edouard_at_[hidden])
Date: 2009-03-02 13:54:31

> How many worker-threads should be created inside the default
> threadpool?
[Edouard A.]

As many threads as there are physical available sounds like a nice default
to me.

> Which scheduling strategy should by applied?
[Edouard A.]

> The pool could use FIFO ordering of the queued tasks but the amount of
> worker-threads depend on the threadpool usage.
> THe pool could create as many worker-threads as CPUs are online an bind
> each
> thread to one specific CPU/Core - CPU intensive apps could benefit form
> this
> scenario.
[Edouard A.]

Unless you know what you're doing it's best to let the OS decide on which
CPU the thread should be running. For a default pool I submit it is better
to let affinity alone. As noted above I agree with one thread / core.

Don't forget you're going to have threads outside your pool also requesting
the preciouuuus CPU resource.

Applications with lot of IO require usally more worker-
> threads than
> CPUs.
[Edouard A.]

You are correct but this doesn't sound like an use case for a "default"


Boost list run by bdawes at, gregod at, cpdaniel at, john at