Object-Level Memory Allocation and Migration in Hybrid Memory Systems

Haikun Liu, Renshan Liu, Xiaofei Liao, Hai Jin, Bingsheng He, Yu Zhang

Introduction

As data-intensive applications continue to scale, modern memory hierarchies are evolving to incorporate hybrid memory systems. These systems typically pair high-bandwidth, low-latency DRAM with high-density, energy-efficient Non-Volatile Memory (NVM). However, the effectiveness of these systems hinges on data placement: ensuring that "hot" (frequently accessed) data resides in DRAM while "cold" data is relegated to NVM.

Traditional management techniques operate at the page level (typically 4KB), managed by the Operating System. This paper introduces the Object-level memory Allocation and Migration (OAM) framework, arguing that page-level management is too coarse-grained and semantically blind to meet the needs of modern workloads. By shifting the focus to individual programming objects, OAM significantly reduces migration overhead and improves overall system efficiency.

The Granularity Problem

Existing OS-level page migration strategies suffer from three primary limitations:

  1. Coarseness: A 4KB page often contains a mix of hot and cold objects. Migrating the entire page to DRAM to accommodate one hot object wastes valuable high-speed memory.
  2. Monitoring Overhead: Tracking page-level access patterns at runtime requires frequent TLB invalidations and hardware interrupts, which degrade performance.
  3. Semantic Blindness: The OS lacks insight into application-level logic. It can only react to past access patterns rather than anticipating future phase changes in the application.

Motivation: The Granularity Gap

Empirical analysis of common benchmarks reveals a significant mismatch between page sizes and data structures. In many applications, over 95% of objects are smaller than 50 bytes—orders of magnitude smaller than a standard 4KB page.

Cumulative distribution of object sizes across various benchmarks, highlighting that the vast majority of objects are significantly smaller than a standard memory page.

Furthermore, memory traffic is often highly concentrated; a small fraction of the total memory footprint frequently accounts for nearly all memory references. OAM leverages this concentration by identifying and prioritizing these specific objects for DRAM placement.

The OAM Framework

OAM addresses these challenges through a two-stage workflow that combines offline analysis with automated runtime management.

1. Offline Profiling and Instrumentation (OPCI)

Using the LLVM compiler infrastructure, OAM profiles the target application to capture object lifetimes, sizes, and access frequencies. It employs a utility model to quantify the benefit of placing an object in DRAM versus NVM, accounting for both performance gains and energy consumption. A key innovation is the identification of "mutable" objects—those whose access patterns change significantly across different execution phases.

2. Online Allocation and Migration (OMAM)

Based on the profile, OAM automatically instruments the application's source code. It replaces standard malloc calls with DyMalloc, a custom allocator that places objects in the appropriate memory tier at birth. Additionally, it inserts migration triggers (MigrateToX) at phase boundaries. At runtime, a background helper thread handles the physical movement of data, ensuring that migration does not block the application's critical path.

Overview of the OAM architecture, illustrating the transition from source code profiling to runtime object management.

Key Insights

  • Cache Filtering: A critical component of OAM's profiling is its ability to account for on-chip CPU caches. By simulating cache behavior, OAM avoids migrating data that would otherwise result in cache hits, reducing unnecessary NVM-to-DRAM traffic by an average of 68%.
  • Phase Awareness: Unlike reactive OS-level schemes, OAM is proactive. By identifying execution phases where an object's utility crosses a specific threshold, the system can migrate data before it is needed in a new phase.

Evaluation and Results

The OAM framework was evaluated using benchmarks from SPEC CPU2006, PARSEC 3.0, and PBBS on a hybrid memory emulator. The results demonstrate significant improvements over state-of-the-art page-level migration schemes:

  • Migration Efficiency: OAM reduced data migration traffic by 83% compared to the CLOCK-DWF scheme and 69% compared to 2PP.
  • Energy Savings: The system achieved a 61% average reduction in Energy-Delay-Product (EDP) compared to standard page interleaving.
  • Performance: OAM improved application performance by up to 22% over existing page-level techniques. Notably, the performance of the hybrid system under OAM was within 2% of a pure, DRAM-only system.

Conclusion

The OAM framework demonstrates that fine-grained, object-level management is a superior approach for hybrid memory systems. By moving memory management from the OS into the application layer via automated instrumentation, OAM overcomes the coarseness and overhead of page-level schemes. While currently requiring source code access, OAM provides a blueprint for future memory managers that are both semantically aware and highly efficient.

Summary updated

BibTeX
@article{liu2020object,
  author = {Haikun Liu and Renshan Liu and Xiaofei Liao and Hai Jin and Bingsheng He and Yu Zhang},
  title = {{Object-Level Memory Allocation and Migration in Hybrid Memory Systems}},
  journal = {IEEE Trans. Computers},
  year = {2020},
  doi = {10.1109/tc.2020.2973134},
}
Figure