TL;DR
Processing-in-memory (PIM) promises faster data-intensive workloads by moving computation closer to memory. However, commercial PIM systems like UPMEM struggle with slow and inefficient data transfers between standard DRAM and PIM memory. This paper introduces PIM-MMU, a novel hardware/software co-design that significantly accelerates these transfers, leading to substantial performance and energy efficiency gains for PIM systems.
What Problem Does This Paper Address?
Modern computing is increasingly bottlenecked by memory access, especially for data-intensive workloads like AI and graph processing. Processing-in-memory (PIM) architectures aim to alleviate this by integrating compute units directly within or near memory modules. While promising, commercial PIM systems, particularly those integrated with the host processor's memory bus (like UPMEM), face significant challenges in efficiently moving data between the main DRAM and the PIM memory. These challenges include:
- High CPU Overhead: The host CPU is heavily involved in orchestrating data transfers, leading to high utilization and power consumption.
- Sub-optimal PIM Throughput: The bank-level PIM design and coarse-grained memory scheduling prevent full utilization of memory-level parallelism (MLP), resulting in low read/write speeds.
- Reduced DRAM Throughput: To avoid conflicts, PIM systems often employ a simplified memory mapping that sacrifices the MLP optimizations crucial for high DRAM performance.
Essentially, the current approach to data movement in commercial PIM systems is a major performance bottleneck, negating many of PIM's potential benefits.
Methods
The authors propose PIM-MMU, a hardware/software co-design to tackle these data transfer challenges. It comprises three key hardware components integrated into a dedicated unit:
- Data Copy Engine (DCE): This hardware engine offloads the entire data transfer process from the CPU. It handles reading from DRAM, preprocessing (like transposing data), and writing to PIM, without CPU intervention.
- PIM-aware Memory Scheduler (PIM-MS): Integrated within the DCE, PIM-MS addresses the coarse-grained scheduling issue. It leverages the fact that PIM memory accesses are mutually exclusive and employs a hardware-level, fine-grained scheduling to maximize MLP and improve PIM read/write throughput.
- Heterogeneous Memory Mapping Unit (HetMap): This unit provides a dual memory mapping strategy. It uses an MLP-centric mapping for DRAM accesses to maintain high throughput and a locality-centric mapping for PIM accesses, ensuring correct PIM address space management without sacrificing DRAM performance.
These hardware components are supported by a PIM-MMU software stack (runtime library and device driver) that provides a unified API for programmers to leverage PIM-MMU's capabilities.
Datasets
The paper evaluates its proposed PIM-MMU using:
- Microbenchmarks:
- A custom microbenchmark for DRAM-to-DRAM data transfer (memcpy) to evaluate HetMap's impact on standard DRAM throughput.
- The
CPU-DPUmicrobenchmark from the open-source PrIM [43] benchmark suite to specifically measure DRAM-PIM data transfer throughput. - Real-world PIM Benchmarks: 16 memory-intensive workloads from the PrIM [43] benchmark suite are used to evaluate the end-to-end performance impact.
Key Insights and Ideas
- The "Data Transfer Bottleneck" is Real and Severe: The paper's characterization of UPMEM-PIM highlights that data transfers between DRAM and PIM can consume an overwhelming majority (up to 99.7%) of the total execution time. This underscores the critical need for dedicated hardware solutions.
- PIM's Unique Properties Enable New Scheduling: The mutual exclusivity of PIM memory accesses, a consequence of its design, is a key insight. This property allows for more aggressive, hardware-level scheduling (PIM-MS) that is not possible in traditional memory systems.
- A Unified Hardware/Software Approach is Crucial: PIM-MMU's success stems from the synergistic combination of its hardware components (DCE, PIM-MS, HetMap) and its software interface. Simply having a DMA engine isn't enough; it needs to be PIM-aware.
- DRAM Performance Shouldn't Suffer for PIM: The HetMap's dual mapping strategy is a clever solution to ensure that enabling PIM doesn't degrade the performance of standard DRAM operations, a common trade-off in existing systems.
Key Results
PIM-MMU demonstrates significant improvements over the baseline UPMEM-PIM system:
- DRAM↔PIM Data Transfer Throughput: Improved by an average of 4.1x (up to 6.9x).
- Energy Efficiency: Enhanced by an average of 4.1x (up to 6.9x).
- End-to-End Speedup: Achieved an average 2.2x (up to 4.0x) speedup for real-world PIM workloads.
- DRAM Throughput: HetMap alone improved DRAM-to-DRAM (memcpy) throughput by an average of 4.9x (up to 6.0x).
- Robustness: PIM-MMU showed high robustness against compute-intensive workloads, with performance degradation being significantly less than the baseline.
- Implementation Overhead: The additional area overhead for PIM-MMU is minimal, estimated at only a 0.37% increase in CPU die size.
Limitations and Future Work
- Limitations:
- The paper acknowledges that while PIM-MMU significantly improves data transfer, the execution time of PIM kernels themselves is not directly addressed.
- The evaluation of DRAM-PIM data transfer time in the real-world benchmarks was scaled based on simulation results, as direct measurement of this component was not feasible.
- The baseline system's CPU model in the simulation did not support AVX instructions natively, requiring emulation.
- Future Work:
- The authors suggest that further research could explore how to integrate PIM-MMU's capabilities more deeply into PIM architectures to further optimize PIM kernel execution.
- The paper implicitly points towards the need for more sophisticated PIM-aware operating system schedulers to complement hardware solutions like PIM-MMU.
Summary updated