TL;DR
This paper introduces a novel approach to minimize energy consumption in OpenMP parallel applications on many-core systems. By intelligently combining dynamic voltage and frequency scaling (DVFS) for sequential code sections with DVFS and dynamic core allocation (DCT) for parallel sections, the method achieves significant energy savings without compromising performance.
What Problem Does This Paper Address?
Modern computing systems are increasingly featuring many-core architectures, leading to a surge in power consumption and energy demands. While parallel programming models like OpenMP help harness the computational power of these systems, optimizing for energy efficiency without sacrificing performance remains a significant challenge. Existing approaches often focus solely on the parallel parts of applications or rely on extensive offline training, limiting their adaptability to different hardware configurations and dynamic workloads. This paper addresses the need for a more holistic and adaptive energy minimization strategy that considers both sequential and parallel code segments and can dynamically adjust to runtime conditions.
Methods
The core of the proposed approach lies in its adaptive control strategy, which operates in three main stages:
- Performance Annotation: The application code is instrumented with custom OpenMP pragmas (
#pragma omp sequential perf(...)and#pragma omp parallel for perf(...)). These annotations provide the runtime with approximate maximum execution times (AMETs) and required execution times (AETs) for both sequential and parallel code sections. This allows developers to specify performance targets. - Energy Minimization in Sequential Parts: For sequential code, the system employs dynamic voltage and frequency scaling (DVFS). It uses an iterative learning control (ILC) algorithm that predicts workloads using an exponentially weighted moving average (EWMA) and adjusts the CPU frequency accordingly. This is guided by performance errors and aims to reduce energy consumption while meeting the specified AET.
- Energy Minimization in Parallel Parts: This stage combines both DVFS and dynamic concurrency throttling (DCT). Initially, an algorithm (Algorithm 1) determines an optimal combination of core allocation and operating frequency to meet the target performance. Subsequently, DVFS is refined using an ILC similar to the sequential part, but it also incorporates DCT. DCT dynamically adjusts the number of active cores based on workload predictions and thread synchronization events, further optimizing energy efficiency.
The entire system is implemented within a modified OpenMP runtime library, allowing for seamless integration and runtime adaptation.
Datasets
The paper evaluates its approach using the NAS Parallel Benchmarks (NPB) suite, specifically class B (medium) and class C (large) input sizes. These benchmarks are widely used for evaluating parallel application performance and are representative of scientific computing workloads. The experiments were conducted on an Intel Xeon E5-2630 platform.
Key Insights and Ideas
- Sequential Code Matters: The paper highlights that ignoring energy optimization in sequential code segments can lead to suboptimal overall energy savings, as these parts can still contribute significantly to execution time and power draw.
- Adaptive Learning is Key: The use of iterative learning control (ILC) for both DVFS and DCT allows the system to dynamically adapt to varying workloads and performance feedback, making it more robust than static or offline-trained approaches.
- Joint DVFS and DCT Synergy: Combining DVFS with dynamic core allocation in parallel sections provides a more powerful knob for energy management, allowing for finer-grained control and better trade-offs.
- Scalability Across Architectures: The proposed approach demonstrates good scalability, maintaining its effectiveness across different hardware architectures and core counts without requiring extensive re-training.
Key Results
The proposed adaptive energy minimization approach achieved significant energy savings:
- Up to 17% reduction in energy consumption compared to existing approaches.
- Specifically, it outperformed the Linux "ondemand" governor by up to 17%, and approaches from Matthew et al. [7] and Pack & Cap [11] by up to 10% and 7%, respectively.
- The approach effectively managed performance trade-offs, with execution times often increasing by less than 8% while achieving substantial energy savings. For instance, a 15% increase in parallel execution time led to up to 11% energy reduction in some cases.
Limitations and Future Work
The authors acknowledge that the approach relies on performance annotations, which require initial profiling. While this profiling is less intensive than the offline training used in some prior works, it's still a step in the process.
Future work suggested includes exploring energy-delay product-based adaptive optimization and investigating the impact of overheads associated with the adaptive control mechanisms.
Summary updated