Abstract
Memory subsystem contributes 28-40% of total energy consumption. Several studies investigated energy prediction and consumption via profiling memory object access patterns. However, such profiling leads to higher energy consumption due to intense memory object-level profiling to achieve high prediction accuracy. Further, memory object access pattern prediction has been considered through analyzing the variation between memory object access patterns, referred to as scaling rate. The existing techniques for scaling rate prediction, such as Linear Scaling Rate (LSR), suffer from a high error rate in prediction with changes in access patterns, which leads to a high error rate of energy consumption prediction. In this paper, we compare and evaluate several memory object access pattern prediction models including LSR and machine learning (ML) models. Further, we propose ScaleML, a heap memory object scaling rate prediction mechanism that employs an ML model to achieve high access pattern prediction accuracy with variations in memory object access patterns. We evaluate ScaleML using various application benchmarks. The experimental results show that ScaleML achieves about 20% higher accuracy than the LSR model for predicting the scaling rate of object access patterns and energy estimation.
Introduction
As data centers expand, the memory subsystem has become a significant energy consumer, accounting for up to 40% of total power consumption. Optimizing this requires a deep understanding of "memory object access patterns"—metrics such as object size, lifetime, and access frequency. However, profiling these patterns at a granular level is computationally expensive and energy-intensive.
The ideal solution is to profile a small workload once and accurately predict how these patterns scale as the workload grows. Traditional methods rely on the Linear Scaling Rate (LSR), which assumes memory usage patterns scale linearly with data size. Unfortunately, real-world applications often exhibit non-linear or irregular scaling, leading to prediction errors as high as 68% in certain benchmarks. This paper introduces ScaleML, a framework that leverages machine learning to overcome these limitations.
Methodology
ScaleML moves beyond simple linear assumptions by employing a two-phase approach to predict memory object scaling.
1. Profiling Phase
The framework utilizes a Two-Pass Memory Profiler (TPMP). In the first pass, it hooks into standard memory allocation calls (e.g., malloc) to identify heap objects. In the second pass, a "Pin-Tool" tracks instruction-level access details to capture runtime patterns.
2. Training and Prediction Phase
The captured data is used to train machine learning models. The authors evaluated Linear Regression (LR), K-Nearest Neighbor (K-NNR), and Random Forest Regression (RFR). Random Forest (RFR) was selected as the primary model due to its ability to independently learn the unique scaling "quirks" of different objects within the same application, making it robust against non-linear data.
Experimental Setup
ScaleML was evaluated using two industry-standard benchmark suites:
- PBBS (Problem Based Benchmark Suite): Utilizing Breadth First Search (BFS) and Spanning Forest (SF) algorithms.
- NPB (NAS Parallel Benchmarks): Utilizing Conjugate Gradient (CG) and 3D Fast Fourier Transform (FT).
Models were trained on four different workload sizes and tested on a fifth, larger workload to evaluate prediction accuracy across various metrics: object size, accessed volume, and lifetime.
Results and Discussion
The experimental results demonstrate that ScaleML significantly outperforms traditional linear models.
Superior Prediction Accuracy
ScaleML, utilizing the RFR model, achieved an average prediction accuracy of 92.85%. This represents a 20.1% improvement over the traditional LSR model. The RFR model's strength lies in its ensemble nature; it builds multiple decision trees that capture diverse scaling behaviors for different types of heap objects.
Energy Estimation Precision
The improved accuracy in predicting memory access patterns directly translates to better energy modeling. ScaleML's energy consumption estimates were 19.85% more precise than those derived from LSR. In specific cases, such as the Conjugate Gradient (CG) benchmark, RFR outperformed K-NNR by 23.6% in predicting object lifetimes.
Model Complexity and Efficiency
The study also explored the impact of model complexity. It was found that prediction accuracy typically saturates when using between 60 and 80 trees in the Random Forest. Beyond this point, additional trees provide diminishing returns, which is a critical finding for maintaining an efficient prediction framework.
Conclusion and Future Work
ScaleML demonstrates that machine learning can effectively bridge the gap between low-overhead profiling and high-accuracy memory scaling prediction. By moving away from the "linearity myth," ScaleML provides a more realistic foundation for energy optimization in modern data centers.
Future research will focus on reducing the overhead of the initial profiling phase (TPMP) and extending the framework's applicability to emerging memory architectures like Non-Volatile Memory (NVM) and hybrid memory systems. Additionally, exploring real-time, "on-the-fly" prediction during application execution remains a promising direction.
Summary updated