Abstract
Modern Deep Learning Recommendation Models (DLRMs) require terabytes of memory for embedding tables, often forcing inefficient "scale-out" across numerous server nodes. MTrainS is a novel training system that leverages a heterogeneous memory hierarchy—combining HBM, DRAM, Storage Class Memory (SCM), and SSDs—to address this capacity bottleneck. By employing intelligent table placement via mixed-integer linear programming and an exclusive software-managed cache, MTrainS reduces the required node count by 4–8× and cuts energy consumption by up to 50% without compromising training performance.
Introduction
The scale of recommendation systems used for content ranking and click-through prediction has grown exponentially. These models rely on massive embedding tables to map categorical inputs into dense vectors. Because these tables often exceed the RAM capacity of a single server, training typically requires distributing the model across a large cluster. This "memory-capacity bound" scaling leads to underutilized compute resources and high operational costs. MTrainS addresses this by fitting TB-scale models into fewer nodes using a tiered memory approach.
Methods
MTrainS implements an end-to-end pipeline designed for a four-tier memory stack: GPU HBM, system DRAM, byte-addressable SCM, and NAND Flash SSDs.
The system features several core innovations:
- Software-Managed Hierarchical Cache: An exclusive LRU cache ensures that unique data is stored across DRAM and SCM, avoiding the "double caching" inefficiencies of hardware-managed modes.
- Smart Table Placement: A Mixed-Integer Linear Programming (MILP) solver optimizes the placement of embedding tables across tiers based on their specific size and bandwidth demands.
- RocksDB Integration: SSD-based storage is managed via RocksDB, utilizing sharding and compaction to maintain high throughput for embedding rows.
- Latency Hiding: Techniques such as aggressive prefetching and deferred initialization help mitigate the higher latency of SSDs and reduce hardware wear.
Datasets
Evaluation was conducted using large-scale, production-grade workloads from Meta’s data centers:
- Model 1: A capacity-bound content discovery ranking model.
- Model 1+: A synthetic version scaled to 2× the size of Model 1.
- Model 2: A bandwidth-bound click-through rate (CTR) prediction model.
Key Insights and Ideas
The viability of MTrainS rests on two primary observations:
- The Big Table Paradox: There is a significant disparity between the size of an embedding table and its bandwidth requirements. As shown in the figure below, the largest tables often have the lowest access frequencies. This allows the system to place massive, low-bandwidth tables on slower, cheaper storage (SSDs) while reserving fast memory (HBM/DRAM) for smaller, high-bandwidth tables.
- Temporal Locality: Despite seemingly random access patterns, embedding lookups follow a power-law distribution. Approximately 80% of accesses target only 10-40% of the indices, making hierarchical caching highly effective.
Key Results
- Node Reduction: MTrainS enabled a 4–8× reduction in host requirements for capacity-bound models, allowing 8-node clusters to be consolidated into a single node.
- Energy Efficiency: Total energy consumption for training was reduced by up to 50%.
- Performance: MILP-based optimization yielded a 2.5–4.2× speedup in Queries Per Second (QPS) over unoptimized placement.
- Endurance: Deferred initialization reduced SSD writes by approximately 15%, extending the lifespan of flash storage.
Limitations and Future Work
Bandwidth-bound models like Model 2 remain challenging for single-node configurations, as even SCM may not provide sufficient throughput for production targets. Future research will focus on cross-table locality heuristics, GPU Direct Storage (GDS) integration, and multi-node MTrainS configurations for even larger future-scale models.
Summary updated