4 ms·
According to [1], the most important factor for the power consumption of code is how long the code takes to run. Code that spreads over multiple cores is genera
by MrJohz 9mo ago
According to [1], the most important factor for the power consumption of code is how long the code takes to run. Code that spreads over multiple cores is generally more power efficient than code that runs sequentially, because the power consumption of multiple cores grows less than linearly (that is, it requires less than twice as much power to run two cores as it does one core).
Therefore if parallelising code reduces the runtime of that code, it is almost always more energy efficient to do so. Obviously if this is important in a particular context, it's probably worth measuring it in that context (e.g. embedded devices), but I suspect this is true more often than it isn't true.
[1]: https://arxiv.org/abs/2410.05460 https://arxiv.org/abs/2410.05460
- fauigerzigerk 9mo ago>Therefore if parallelising code reduces the runtime of that code, it is almost always more energy efficient to do so Only if it leads to better utilisation. But in the scenario that the parent comment suggests, it does not lead to better utilisation as all cores are constantly busy processing requests. Throughput as well as CPU time across cores remains largely the same regardless of whether or not you paralellise individual programs/requests.
- MrJohz 9mo agoThat's true, which is why I added the caveat that this is only true if parallelising reduces the overall runtime - if you can get in more requests per second through parallelisation. And the flip side of that is that if you're able to perfectly utilise all cores then you're already running everything in parallel. That said, I suspect it's a rare case where you really do have perfect core utilisation.