Performance vs. Energy Efficiency

Overview

Increasing performance is generally good for energy efficiency. However, this is not always the case. The scenarios listed below show that increasing performance doesn't necessarily improve energy and resource efficiency. In fact, there are scenarios where increasing performance can actually decrease energy or resource efficiency!

Nevertheless, in most cases, optimizing software performance can lead to energy savings. Note that achieving optimal energy efficiency often requires a holistic approach that considers both software and hardware optimizations, as well as user behavior and system requirements. Also, performance engineering techniques are quite useful for assessing the efficiency of a system.

In summary, optimizing for energy efficiency is more than just optimizing for performance. Optimizing for performance usually means meeting a certain requirement, such as a response time <500ms. Optimizing for energy efficiency is about achieving the lowest possible power consumption.

Clean Code & Performance

Clean code can have a negative impact on performance. It can be assumed that this has a similar effect on energy consumption.

Using more hardware

Suppose a software system experiences high user demand, leading to the need for improved performance and responsiveness. To meet this demand, more servers may be deployed, each consuming a certain amount of energy. While the increased infrastructure enhances performance by distributing the workload and handling more requests simultaneously, the overall energy consumption rises due to the additional servers operating in parallel.

Kill it with hardware improves the performance, but decreases the energy efficiency.

Low utilization

In scenarios where the system spends most of its time in a low-power sleep mode, performance improvements during active use may have little impact on overall energy consumption. The same is true for scenarios where the server is running at low utilization most of the time. To achieve high energy and resource efficiency, utilization should be close to 100%. To achieve high performance, a lower utilization may be desirable to avoid the risk of CPU throttling.

Parallel processing

pang.etal.2016.whatprogrammersknow (pg. 1)

Performance optimization is often considered a substitute for energy optimization because a faster system likely consumes less energy. Although this is a step in the right direction, it’s insufficient and sometimes even incorrect. For instance, parallel processing might improve performance by reducing calculation time. However, saving and restoring execution context, scheduling threads, and losing locality might end up consuming more resources than sequential processing.

Energy-intensive background processes

Performance enhancements focused on foreground tasks might not have a significant impact on the energy consumption of background processes. If energy-intensive background tasks continue to run at the same pace or are unaffected by performance improvements, the overall energy consumption may remain high despite increased performance.

Performance over-optimization

Techniques like aggressive code parallelization or increasing clock speeds, which can enhance performance, may result in higher energy consumption. Over-optimizing for performance alone can overlook potential energy-saving opportunities.

Hardware limitations

In certain cases, the hardware itself may have energy limitations that prevent energy savings from increased software performance. If the hardware components are not designed for energy efficiency or have fixed energy consumption profiles, software optimizations alone may not be sufficient to reduce energy consumption.

Examples:

Usage of energy-inefficient hardware features

Intel Turbo Boost

charles.etal.2009.evaluationintelcore (pg. 1)

We found that Turbo Boost can provide (on average) up to a 6% reduction in execution time but can result in an increase in energy consumption up to 16%.

Intel Hyper-Threading

Intel Hyper-Threading seems to be feature that improves both, performance and energy efficiency πŸ˜€

All in all we are very surprised about how energy friendly the feature is and especially for the typical server workloads that are rather multi-threaded and mostly idling. Since Hyper-Threading seems to have no effect on idle CPUs this seems like a perfect fit.
β€” Hyper-Threading and energy - Processor energy configuration series - Part 1 | green-coding.berlin

trefethen.thiyagalingam.2013.energyawaresoftwarechallenges (pg. 4)

In summary, the following can be concluded from these results:

(1) There is a clear interaction between runtime and energy but this is not a simple relationship and can be affected by the compute environment and algorithmic approach used in the application.
(2) The problem size, locality and thread-count all affect the overall energy consumption.
(3) Compilers and the options used can have a significant impact on the energy consumption of (multithreaded) applications. By the same token, the software transformations play a key role both in runtime performance and energy consumption.
(4) Although threading improves performance, the energy consumption may not improve. The energy consumption is highly dependent on the degree of parallelism and on the underlying architecture.
(5) The hyper-threading, when present, clearly improves the energy efficiency in highly computational applications.
And finally, (6) by appropriately identifying the interaction between multiple parameters (such as frequency, threading and compilers) it is possible to secure substantial energy savings along with considerable performance gain.