Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

processes only using 50 % of CPU

I have this stange problem on a new computer with 6 cores.
When i run a threadded procedure it only uses 50% of the CPU. this happens on both linux and on windows. However, i have another windows machine (4 cores) where it is able to use 100% cpu.

I am a novice to this and have no clue of why this is happening

Could sombody help me out here

0 Kudos
1 Reply
Valued Contributor III
This looks similar to "Two machines, two very different performances for a same program."

If you feel like experimenting, try to find out what happens if you constrain TBB to 4 cores using task_scheduler_init (whose lifetime should encapsulate any other TBB work to have this effect, so it's best to use it early on in main()). If you now see similar usage patterns between the two machines, your program is likely not sufficiently scalable, either inherently (you cannot magically conjure parallelisability out of thin air), or by implementation (where you do have an opportunity if you wrote the code), or both. If it doesn't really help (but do try the above first), find out more about the NUMA layout of the 6-core machine, and perhaps try to repeat the experiment using task_scheduler_observer to additionally bind the threads to a set of closely connected cores (probably fewer than 4, so it's not really relevant).

If anybody has additional or corrective insights (what if any the NUMA layout of the 6-core machine of unspecified origin is likely to be, or anything else), pray tell.
0 Kudos