Performance vs. Energy Efficiency
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 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
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:
- fixed power profiles β hardware operates at a constant power level regardless of the software demands
- lack of advanced power management features
- limited support for low-power states (e.g., sleep modes)
Usage of energy-inefficient hardware features
Intel Turbo Boost
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