Cuttlefish: library for achieving energy efficiency in multicore parallel programs

Sunil Kumar, Akshat Gupta, Vivek Kumar, Sridutt Bhalachandra

Introduction

As high-performance computing (HPC) approaches the Exascale era, energy consumption has emerged as a primary bottleneck. Supercomputers are often constrained by strict power budgets, typically capped at 20–30 MW. While techniques like Dynamic Voltage and Frequency Scaling (DVFS) are commonly used to manage CPU core power, modern processors also feature an "uncore"—components such as memory controllers and shared caches that significantly impact overall energy efficiency.

Existing tools for energy management often require extensive offline training, are tied to specific programming models (like MPI), or ignore the uncore entirely. Cuttlefish addresses these gaps as a C/C++ library that dynamically tunes both core and uncore frequencies. It is "programming model oblivious," meaning it works across various frameworks like OpenMP or HClib without prior knowledge of the application's behavior.

The TIPI Metric and Online Profiling

Cuttlefish operates via a lightweight background daemon thread that monitors the processor's state every 20 milliseconds. To characterize an application's behavior on the fly, the researchers introduced a new metric: TOR Inserts per Instruction (TIPI). By reading hardware-level Model-Specific Registers (MSRs), Cuttlefish measures the frequency of data requests from the core to the uncore, creating a unique fingerprint of the application's Memory Access Pattern (MAP).

Figure 1: Execution timeline of TOR Inserts per Instruction (TIPI) for various HPC benchmarks, illustrating how the metric distinguishes different memory access patterns.

When a new memory pattern is detected, Cuttlefish performs a rapid linear search to identify the optimal combination of core and uncore frequencies that minimizes Joules per Instruction (JPI). To ensure stability, the library incorporates a two-second warmup period, allowing caches to stabilize before tuning begins.

The Core-Uncore Inverse Relationship

A key insight from the Cuttlefish evaluation is the inverse relationship between core and uncore frequency requirements. Compute-bound applications (characterized by low TIPI) achieve maximum efficiency with high core frequencies and low uncore frequencies. In contrast, memory-bound applications (high TIPI) benefit from higher uncore frequencies to accelerate data movement, allowing the cores to be slowed down to save power without significantly impacting performance.

Figure 2: Energy efficiency (JPI) as a function of core and uncore frequency across different TIPI ranges, demonstrating the optimal frequency "sweet spots" for various workloads.

Evaluation and Results

The researchers evaluated Cuttlefish on a 20-core Intel Xeon Haswell processor using ten diverse HPC benchmarks, including UTS (Unbalanced Tree Search), MiniFE, and AMG. The library was tested across different parallel styles, such as regular and irregular tasking.

Key results include:

  • Energy Savings: A geometric mean energy saving of 19.4% compared to the default "performance" power governor.
  • Performance Impact: An average slowdown of only 3.6%, a highly acceptable trade-off for significant power reduction.
  • Energy-Delay Product (EDP): An overall improvement of 16.5% in the EDP metric, which balances energy use and execution speed.
  • Versatility: Consistent results across both OpenMP and HClib, proving the library's independence from the underlying software model.

Conclusion and Future Work

Cuttlefish provides a robust, plug-and-play solution for improving energy efficiency in multicore environments by leveraging hardware-level metrics rather than software pragmas. While currently optimized for Intel-based single-node systems, future work aims to extend Cuttlefish to support AMD processors, inter-node communication slack in MPI+X applications, and heterogeneous components like GPUs.

Summary updated

BibTeX
@inproceedings{kumar2021cuttlefish,
  author = {Sunil Kumar and Akshat Gupta and Vivek Kumar and Sridutt Bhalachandra},
  title = {{Cuttlefish: library for achieving energy efficiency in multicore parallel programs}},
  booktitle = {SC},
  year = {2021},
  doi = {10.1145/3458817.3476163},
}
Figure