different behavior when using different number of multicoring workers

后端 未结 1 1670
天命终不由人
天命终不由人 2020-12-06 06:19

I am playing around a bit with my program (trying to multicore a few parts) and I\'ve noticed the \"CPU history\" looks a bit different, depend on how many workers I start.

相关标签:
1条回答
  • 2020-12-06 07:03

    This is classic behaviour on a quad-core with hyperthreading. R doesn't gain with hyperthreading, as it uses often the complete core for the calculations. Thus, if one physical processor makes 2 logical ones, the processor has to switch continuously between both threads, which explains the patterns.

    For R, I put off the hyperthreading on my computer. It just doesn't help, in contrary. When working with only one thread as R does normally, you lose capacity (max is 12.5% instead of 25%).

    0 讨论(0)
提交回复
热议问题