DLRover-RM: Resource Optimization for Deep Recommendation Models Training in the cloud

Qinlong Wang, Tingfeng Lan, Yinghao Tang, Bo Sang, Ziling Huang, Yiheng Du, Haitao Zhang, Jian Sha, Hui Lu, Yuanchun Zhou, Ke Zhang, Mingjie TangPVLDB 2024 · DOI

TL;DR

Deep learning recommendation models (DLRMs) are computationally intensive and suffer from low resource utilization and instability in cloud environments. This paper introduces DLROVER-RM, an elastic training framework that optimizes resource allocation and scheduling for DLRMs, significantly improving training efficiency and reliability.

What Problem Does This Paper Address?

Deep learning recommendation models (DLRMs) are crucial for personalized recommendations across various platforms. However, training these models presents significant challenges:

  • Massive Embedding Tables: DLRMs rely on large embedding tables to represent sparse categorical features, leading to substantial memory and I/O demands. As models grow, these tables can reach terabytes in size.
  • Low Resource Utilization: Despite the computational intensity, DLRM training jobs often exhibit low CPU and memory utilization (under 50%) in cloud environments. This is largely due to users over-provisioning resources to avoid failures, leading to wasted computational power.
  • Cloud Instability: Cloud environments are inherently unstable, with frequent failures (network errors, node malfunctions) and resource contention from other services. This leads to high job failure rates and the emergence of "stragglers" (slow-running components).
  • Inefficient Scaling: Traditional methods for scaling DLRM training jobs (e.g., stopping and restarting) are time-consuming, adding significant overhead and potentially impacting model accuracy due to stale gradients or disrupted training data.

The paper aims to address these issues by developing a system that can efficiently and reliably train thousands of DLRMs concurrently in a dynamic cloud environment, maximizing resource utilization, achieving rapid training speeds, and ensuring fault tolerance.

Methods

DLROVER-RM introduces a novel elastic training framework with several key components:

  • Resource-Performance Model: The core of DLROVER-RM is a model that captures the unique characteristics of DLRM training, specifically the interplay between I/O overhead (from embedding table lookups) and computation demands. This model is used to predict training throughput based on resource allocation.
  • Three-Stage Auto-Scaling Algorithm:
    1. Warm-Starting: Instead of a "cold start," DLROVER-RM uses historical job data to identify similar past jobs and applies an exponential smoothing technique to generate an initial resource configuration that is close to the optimal one. This reduces the time spent on initial scaling.
  • Auto-Scaling: Based on the resource-performance model, DLROVER-RM dynamically adjusts resources (CPU, memory, number of workers/parameter servers) to optimize throughput and resource utilization. It uses NSGA-II for multi-objective optimization and a weighted greedy selection to determine the final execution plan.
  • Instability Handling: This stage addresses cloud instability with several mechanisms:
  • Dynamic Data Sharding: Training data is split into small, variably-sized shards. These shards are dynamically served to workers on-demand, allowing for quick reassignment to stragglers or new workers, balancing workloads and ensuring consistent model quality.
  • Seamless Migration & Flash-Checkpoint: To minimize downtime during scaling, DLROVER-RM overlaps resource initialization with ongoing training. A "flash-checkpoint" mechanism uses shared memory for faster checkpointing and loading, significantly reducing migration overhead compared to traditional stop-and-restart methods.
  • OOM Prevention: A prediction mechanism models memory usage dynamics, particularly for embedding tables, to proactively scale parameter servers with larger memory capacity before out-of-memory (OOM) errors occur.

Datasets

The paper mentions using the Criteo dataset for training and evaluating DLRM models. They also leverage extensive production cluster traces from ANTGROUP for evaluation and to understand real-world DLRM training workloads.

Key Insights and Ideas

  • DLRMs are I/O-bound, not just compute-bound: The paper highlights that embedding table lookups consume a significant portion of DLRM training time, making traditional schedulers that focus solely on computation insufficient.
  • User-provided resource configurations are suboptimal: The trial-and-error approach users take to configure resources leads to over-provisioning and wasted resources. DLROVER-RM's automated approach is crucial.
  • Warm-starting significantly reduces initial scaling time: By leveraging historical data, DLROVER-RM avoids the inefficiency of starting from scratch, leading to faster job initialization.
  • Dynamic data sharding is key to handling stragglers and elasticity: This mechanism allows for fine-grained control over data distribution, enabling quick adjustments without interrupting training or compromising model quality.
  • Seamless migration with flash-checkpoint drastically reduces downtime: Decoupling scaling operations and using fast checkpointing methods are critical for maintaining high availability in unstable cloud environments.

Key Results

DLROVER-RM demonstrated significant improvements across various metrics:

  • Reduced Job Completion Time (JCT): 31% reduction on average, with specific improvements for jobs with hot PSes (21%) and insufficient CPU for PSes (57%).
  • Increased Job Completion Rate (JCR): 6% improvement, with larger gains for larger training jobs (e.g., 11% for jobs needing >100 CPUs).
  • Enhanced Resource Utilization:
    • CPU usage increased by 15% on average.
  • Memory utilization increased by 20% on average.
  • Production Deployment: Widely deployed at ANTGROUP, handling over 95% of DLRM training jobs daily and adopted by 10+ other companies.
  • Comparable to Well-Tuned Configurations: DLROVER-RM achieved comparable job completion times to manually tuned configurations, highlighting its effectiveness without manual effort.
  • Outperformed Competitors: DLROVER-RM showed better throughput and JCT compared to existing schedulers like Elastic Scheduler (ES) and Optimus.

Limitations and Future Work

  • Limitations: The paper acknowledges that while DLROVER-RM significantly reduces scaling overhead, some scaling operations still require pausing training. The effectiveness of the resource-performance model relies on accurate runtime profiling.
  • Future Work: The authors mention plans to apply LLM-based system optimization techniques to further improve job initial configuration. They also aim to explore more sophisticated methods for handling complex cloud instabilities and resource contention scenarios.

Summary updated

BibTeX
@article{wang2024dlrover,
  author = {Qinlong Wang and Tingfeng Lan and Yinghao Tang and Bo Sang and Ziling Huang and Yiheng Du and Haitao Zhang and Jian Sha and Hui Lu and Yuanchun Zhou and Ke Zhang and Mingjie Tang},
  title = {{DLRover-RM: Resource Optimization for Deep Recommendation Models Training in the cloud}},
  journal = {Proc. VLDB Endow.},
  year = {2024},
  doi = {10.14778/3685800.3685832},
}
Figure