How does one modify the thread scheduling behavior when using Threading Building Blocks (TBB)?

Posted by J Teller on Stack Overflow See other posts from Stack Overflow or by J Teller
Published on 2010-03-09T00:32:33Z Indexed on 2010/03/09 0:36 UTC
Read the original article Hit count: 273

Filed under:
|

Does anyone know how to modify the thread scheduling (specifically affinity) when using TBB? Doing a high level analysis on a simple parallel-for application, it seems like TBB is specifying the underlying threads' affinity in a way that reduces performance. Specifically, the cores I'm running on have hyper-threading enabled, and it looks like TBB is affinitizing threads to the same core even if there is a different core left completely unloaded.

FWIW, I realize it's likely that TBB is doing the "right thing" and that changing the threads' affinity will only reduce performance. I'd just like to experiment with it to see if that's really the case.

© Stack Overflow or respective owner

Related posts about tbb

Related posts about c++