TL;DR
This paper introduces PkMin, a novel framework for minimizing peak power consumption in multi-threaded many-core applications with task dependencies (DAGs) and hard deadlines. By exploiting the convex nature of multi-threaded task execution characteristics, PkMin achieves significant peak power reductions compared to existing methods, while ensuring deadlines are met.
What Problem Does This Paper Address?
Modern many-core processors are increasingly used for complex applications composed of numerous tasks with intricate dependencies, often represented by Directed Acyclic Graphs (DAGs). These applications must complete within a strict deadline. While parallelizing tasks across multiple cores can speed up execution, it dramatically increases peak power consumption. High peak power is a critical concern for several reasons: it dictates the cost and complexity of cooling infrastructure, leads to higher on-chip temperatures that can compromise reliability, and can trigger performance-crippling thermal throttling, making execution unpredictable. Existing approaches to peak power minimization typically assume single-threaded tasks, failing to leverage the unique execution properties of multi-threaded tasks. This paper addresses the challenge of minimizing peak power for multi-threaded DAG-based applications while strictly adhering to deadlines.
Methods
PkMin tackles this problem by first serializing the DAG, effectively treating it as a single sequence of tasks. For this serialized DAG, it employs a convex optimization sub-routine to find an optimal task-to-core allocation in the continuous domain. This sub-routine leverages two key observations about multi-threaded tasks: their execution time is discretely convex with increasing core allocation, and their peak power is discretely linear with increasing core allocation. These properties allow for efficient optimization.
To handle the general DAG structure, PkMin iteratively refines the solution. It identifies pairs of independent tasks that can be "stacked" into a single unified task. The execution time of this unified task is the maximum of its constituent tasks' execution times, while its peak power is the sum of their peak powers. This unification process preserves the convexity of execution time and linearity of power characteristics. The modified DAG is then re-serialized and passed back to the convex optimization sub-routine. This iterative process continues until no further beneficial task stacking can be performed or a local minimum in peak power is reached. The core optimization is performed using the NLOpt library, which employs algorithms like the Method of Moving Asymptotes (MMA).
Datasets
The paper uses a set of five benchmarks: CilkSort, DFS, Fibonacci, Pi, and Queens, sourced from the Lace benchmark suite. To generate DAGs, tasks are sampled with replacement, and edges are added with a probability 'p' to maintain acyclicity. This approach allows for the creation of arbitrarily large DAGs and randomized applications for thorough evaluation.
Key Insights and Ideas
- Exploiting Multi-threading Convexity: The core insight is that the execution characteristics of multi-threaded tasks (convex execution time, linear peak power) are amenable to convex optimization, a powerful and efficient mathematical tool. This is a significant departure from prior work that assumed simpler, single-threaded task models.
- Iterative Task Unification: The strategy of "stacking" independent tasks into unified tasks is a clever way to reduce the complexity of the DAG while preserving desirable optimization properties. This allows the framework to progressively simplify the problem and find near-optimal solutions for complex DAGs.
- Deadline as a Feasible Region Constraint: The hard deadline is effectively used to define a convex feasible region for the optimization problem. Minimizing peak power within this region ensures that both performance and power constraints are met.
Key Results
PkMin demonstrates significant improvements in peak power minimization.
- On average, PkMin achieves 49.2% lower peak power compared to a similar state-of-the-art framework (DCPace).
- In a motivational example, PkMin achieved an 85.82% lower peak power and only a 17.45% higher peak power compared to a high peak power configuration and an infeasible low power configuration, respectively.
- For applications with an increasing number of tasks (10 to 100), PkMin shows an average of 48% lower peak power than DCPace, with only a 0.8% increase in energy consumption.
- When the deadline is relaxed for a 100-task application, PkMin can achieve an 88% reduction in peak power with less than a 10% increase in energy consumption.
- PkMin exhibits low polynomial-time computational complexity, making it scalable and suitable for both run-time and design-time applications. For a 100-task application, it requires only 1.3 seconds to compute a near-optimal configuration.
Limitations and Future Work
- Discrete vs. Continuous Optimization: While the convex optimization is performed in the continuous domain, the actual core allocation must be discrete. The paper acknowledges that rounding the continuous solution to discrete values can be tricky and doesn't guarantee optimality, though it aims for near-optimality.
- Task Unification Strategy: The paper mentions choosing the task pair that gives the greatest reduction in execution time on unification. Further exploration into alternative criteria for selecting task pairs for unification could potentially yield even better results.
- Future Work: The authors suggest that PkMin's polynomial-time complexity makes it suitable for run-time and design-time applications. Future work could focus on exploring its application in dynamic scenarios or for more complex many-core architectures.
Summary updated