Multicore CPU energy requirement and load balancing

cpu usagepower-consumption

I am interested in load balancing for multicore CPU systems. If you use 1 CPU with multiple cores, is it more energy efficient to balance the load on several cores, or try to fill up single cores and leave others idle.
The basic assumption is that the amount of work being done in both cases is exactly the same, in the same time. So, is it more efficient to use 4 cores in the same CPU with 25% load each or 1 core with 100% load.
I would assume 1 core with 100% load should be more efficient, but as I might be wrong, I was looking for serious answers about this problem (no guesses).

Best Answer

IMO this question is simply unanswerable in the general case.

On my desk I have one of these new-fangled Core i7-980x 6-core TurboBoost enabled CPUs. If you load up a single core on this machine, it will boost the clock speed of that core, thereby increasing the power consumption of the CPU, so that will make for a huge difference. This CPU as well as other, more modern CPUs can partially de-power inactive cores, increasing the power savings. That's not as true on older CPU models.

Keep in mind that the work that you have to do with one core will necessarily be different than the work you do with multiple cores. If it's the case that you can spread the load out onto multiple cores, you'll find that a lot of extra time will be spent on the single core performing expensive context switches, and your performance will suffer.

Anyway, the problem has too many variables to really answer. One could go on and on about the different types of loads, and anyone who tries to benchmark to get an answer will end up (probably inadvertently) making apples-to-oranges comparisons which don't apply in other use cases.

Oh, and one more thing. Most people will probably quote efficiency in terms of power. You don't want to fall into that trap. Since the time to process the loads will necessarily be different depending on how the loads are balanced, you must integrate the result over time to find the net amount of energy used to complete the jobs in order to arrive at a credible result.

Related Question