TL;DR
Deep Learning Recommendation Models (DLRMs) are exploding in size, making them a significant drain on data center resources. This paper introduces a "Software Defined Memory" (SDM) approach that leverages slower, cheaper Storage Class Memory (SCM) to manage these massive models during inference, achieving substantial power savings (5-29%) and enabling more efficient deployments.
What Problem Does This Paper Address?
The core problem is the insatiable growth of Deep Learning Recommendation Models (DLRMs). These models, crucial for everything from e-commerce to social media feeds, are becoming terabytes in size. This massive footprint leads to enormous data center costs and power consumption. While traditional DRAM is fast, its cost and capacity are becoming prohibitive for serving these models at scale. The challenge is to find a way to provide the necessary memory capacity for these models during inference without breaking the bank or the power budget, especially considering the unique memory access patterns of DLRMs.
Methods
The paper proposes a Software Defined Memory (SDM) system that extends the memory hierarchy to include Storage Class Memory (SCM). This SDM system aims to intelligently manage the vast embedding tables that constitute the bulk of DLRM models. Key techniques include:
- Tiered Memory Hierarchy: Utilizing SCM (like NAND Flash or Optane SSDs) as a slower, denser, and more power-efficient layer below traditional DRAM.
- Software-Defined Cache: Implementing a cache in faster memory (FM) to store frequently accessed embedding rows from the SCM, mitigating the latency penalty of SCM.
- Fine-grained Access: Enabling arbitrary access granularity (down to DWORD) for NVMe devices, crucial for avoiding read amplification and wasted bandwidth when accessing small embedding rows.
- Pooled Embedding Cache: Caching pre-computed (pooled) embeddings to further reduce computation and memory access overhead.
- SM vs. FM Capacity Trade-off: Exploring strategies for placing tables on either SCM or FM, considering factors like model size, access patterns, and performance requirements.
- De-quantization at Load Time: Moving the de-quantization process from inference time to load time to save runtime computation and potentially reduce SM memory footprint.
Datasets
Not discussed in the paper. The paper focuses on evaluating its proposed SDM system on DLRM models, using configurations and performance metrics representative of real-world deployments rather than specific public datasets.
Key Insights and Ideas
- Skewed Memory Bandwidth Requirements: DLRMs exhibit a significant skew in memory bandwidth needs. While some embedding tables are accessed frequently (requiring high bandwidth), the majority are accessed less often, making them prime candidates for slower SCM.
- Locality is Key: Despite the overall lack of spatial locality in embedding tables, temporal locality (certain rows being accessed repeatedly) is high enough to make caching effective. This justifies the use of a software-managed cache in FM.
- Fine-grained Access is Crucial: The small size of quantized embedding rows means that traditional block-based access to SCM leads to significant read amplification and wasted bandwidth. Enabling sub-block access is essential for efficient SCM utilization.
- SCM Enables Scale-Up, Not Just Scale-Out: By providing more memory capacity per host, SDM can reduce the need for complex and costly "scale-out" solutions (sharding models across many machines), simplifying deployment and improving power efficiency.
- Technology Choice Matters: Different SCM technologies (NAND Flash vs. Optane SSD) offer distinct trade-offs in terms of IOPS, latency, cost, and endurance, influencing their suitability for various DLRM models and deployment scenarios.
Key Results
The paper demonstrates significant improvements through its SDM approach:
- Power Savings: Achieved 5% to 29% power savings across different models and scenarios. For instance, a large model (M1) saw a 20% power saving by using SCM with simpler hardware, and multi-tenancy with Optane SSDs projected 29% improvement in perf/watt.
- Reduced DRAM Footprint: For model M1, using SCM allowed for a reduction in DRAM capacity, saving the equivalent of 159.4 TB of DRAM in production-like settings.
- Avoiding Scale-Out: For model M2, the SDM approach prevented the need for scale-out, leading to a 5% power saving and a simplified serving paradigm.
- Performance Improvements: Observed up to 20% reduction in latency per query and 20% more QPS per host for model M1 due to inter-op parallelism enabled by the SDM.
- Cache Hit Rates: Achieved over 96% cache hit rate in steady state for model M1, and more than 90% hit rate in the SM cache for model M2.
Limitations and Future Work
- Warmup Impact: Cold SCM caches can impact performance immediately after a model update. The paper quantifies the extra capacity needed to offset this slowdown but acknowledges it as a factor.
- Endurance Limitations: The endurance of some SCM technologies can limit model update frequency.
- Complexity of Polling IO: While polling IO can improve performance for high IOPS devices like Optane SSDs, it's complex to enable in existing deep learning frameworks.
- Future Work: The authors suggest that standardization of technologies like CXL could make exposing SSD space to the CPU more adoptable. They also highlight the potential for further optimization through inter-operator parallelism and more sophisticated cache management. The paper also points to the need for continued research into de-quantization and pooled embedding caches for more selective application.
Summary updated