Curve fitting based shared cache partitioning scheme for energy saving

Kai Huang, Kai Huang 0002, Ke Wang, Xiaoxu Zhang, Xiaolang YanIEICE Electron. Express 2018 · DOI

Introduction

In modern Multi-Processor Systems-on-Chip (MPSoCs), multiple processing cores often share a single Last Level Cache (LLC). While sharing resources is cost-effective, it introduces the challenge of "cache thrashing," where competing applications interfere with one another's data storage. This interference leads to increased cache misses, forcing the processor to fetch data from main memory—a process that is significantly slower and more power-intensive.

To mitigate this, researchers have explored cache partitioning, which allocates dedicated "slices" of the cache to specific applications. However, finding the optimal partition is difficult. Simple "even split" strategies are often inefficient, while complex optimization methods like Integer Linear Programming (ILP) are computationally expensive, sometimes consuming more energy to calculate the solution than they save in operation. This paper proposes a novel Curve Fitting based Shared Cache Partitioning (CFP) scheme designed to provide high-accuracy resource allocation with minimal computational overhead.

The CFP Framework

The proposed CFP framework transforms the discrete problem of cache way allocation into a continuous mathematical optimization problem. The process follows three distinct stages:

  1. Memory Access Estimation (MAE): The system collects a limited set of discrete data points representing an application's miss rate when assigned different amounts of cache ways.
  2. Curve Fitting (CF): This stage is the core innovation. The algorithm identifies "inflexion points" in the performance data—points where the benefit of adding more cache begins to level off. As illustrated in the following figure, the system then applies a hybrid modeling approach. It uses an exponential function (often based on the "sqrt2 rule" heuristic) for the high-utility region where small increases in cache size yield large performance gains, and linear functions for regions where performance stabilizes.
Inflexion point detection and hybrid curve fitting for cache behavior modeling.
  1. Cache Partition (CP): By representing cache behavior as continuous functions, the researchers can formulate a total energy equation ($E_{mem}$) that accounts for both dynamic switching power and static leakage power. Finding the optimal partition then becomes a standard calculus problem of finding a mathematical extremum, which is significantly faster than traditional search-based optimization.

Experimental Evaluation

The researchers evaluated the CFP scheme using the SPEC2006 benchmark suite on a GEM5 simulator configured with an ARM Cortex-A8 architecture. The hardware setup featured a 2 MB 16-way associative shared L2 cache and 512 MB of main memory. To ensure accurate power modeling, the team utilized CACTI, an industry-standard tool for estimating the energy and performance parameters of cache memories.

Results and Discussion

The CFP scheme demonstrated significant improvements in both energy efficiency and modeling accuracy:

  • Energy Savings: The scheme achieved up to 34.5% energy savings compared to unpartitioned caches. When compared to a standard even-partitioning strategy, CFP reduced energy consumption by an average of 30.2%.
  • Accuracy: The hybrid curve-fitting model proved highly reliable, with an average prediction error for the shared L2 cache miss rate of only 3.3%. The maximum error for final energy predictions remained below 10% (9.1%).
  • Scalability: Simulations across dual-core, quad-core, and octo-core systems confirmed that the approach scales effectively as system complexity increases.

A key insight from the results is the importance of modeling static energy. The CFP model recognizes that in some scenarios, it is more energy-efficient to entirely shut down unused cache ways rather than simply attempting to minimize the miss rate. This energy-centric focus distinguishes CFP from many existing performance-centric partitioning schemes.

Conclusion and Future Work

The CFP framework provides a fast, mathematically grounded approach to cache partitioning that bypasses the "combinatorial explosion" of traditional optimization. By prioritizing simplicity and using heuristics like the "sqrt2 rule," the authors created a model that is both physically grounded and computationally inexpensive.

While highly effective, the researchers noted that certain complex workloads (such as 403.gcc) exhibited higher prediction errors, suggesting that some memory access patterns require more sophisticated modeling. Future work will focus on increasing the granularity of partitioning and adapting the scheme into a dynamic, real-time system capable of adjusting to application phase changes during runtime.

Summary updated

BibTeX
@article{huang2018curve,
  author = {Kai Huang and Kai Huang and Ke Wang and Xiaoxu Zhang and Xiaolang Yan},
  title = {{Curve fitting based shared cache partitioning scheme for energy saving}},
  journal = {IEICE Electron. Express},
  year = {2018},
  doi = {10.1587/elex.15.20180886},
}
Figure