Analyzing and Mitigating Data Stalls in DNN Training

Jayashree Mohan, Amar Phanishayee, Ashish Raniwala, Vijay Chidambaram · DOI

Introduction

While GPUs continue to achieve massive performance gains, Deep Neural Network (DNN) training is increasingly bottlenecked by the "data pipeline"—the multi-stage process of fetching and pre-processing data. This paper introduces DS-Analyzer to profile these "data stalls" and CoorDL, a library that uses domain-specific caching and coordination to eliminate redundant work, resulting in training speedups of up to 5× over state-of-the-art solutions like NVIDIA DALI.

The Data Pipeline Bottleneck

In the race to train larger models faster, the community has focused heavily on optimizing GPU kernels and reducing inter-GPU communication. However, a growing "tax" on performance exists in the input data pipeline. Before a GPU can process a minibatch, the data must be fetched from storage (I/O) and pre-processed (CPU-intensive tasks like decoding, cropping, and flipping).

The DNN data pipeline stages: Fetching (F), Pre-processing (P), and GPU computation (G).

When the GPU sits idle waiting for this process to finish, it is termed a data stall. The authors identify two primary types:

  1. Fetch Stalls: Bottlenecks at the storage layer (HDD/SSD).
  2. Prep Stalls: Bottlenecks at the CPU layer, typically due to expensive image or audio decoding.

Methodology

DS-Analyzer

To precisely measure stalls, the authors developed a differential profiling tool that runs three versions of a training job to isolate variables:

  • Ingestion Rate: Uses synthetic data to find the maximum speed the GPU can handle.
  • Prep Stall Measurement: Uses a small, fully cached dataset to isolate CPU pre-processing time.
  • Fetch Stall Measurement: Uses a cold cache to measure the impact of storage I/O.

CoorDL: Coordinated Data Loading

CoorDL implements three novel techniques to mitigate these stalls:

  • MinIO Cache: Unlike the OS Page Cache, which uses an LRU (Least Recently Used) policy that "thrashes" during random DNN access, MinIO uses a no-replacement policy. It fills a portion of RAM with a random subset of the dataset and retains it, ensuring a consistent hit rate every epoch.
  • Partitioned Caching: In distributed training, servers coordinate their caches. If Server A needs a file already in Server B’s RAM, it fetches it over the high-speed network rather than accessing slow local disks.
  • Coordinated Prep: During hyperparameter search, multiple jobs often process the same data. CoorDL creates a shared staging area where one job pre-processes an image and others consume the result, eliminating redundant CPU work.

Key Insights: The Caching Mismatch

A critical finding is that standard operating system abstractions are not designed for the unique access patterns of DNN training (random access within an epoch, repeated across many epochs). This leads to "epochal locality" where the OS constantly evicts useful data, causing significant "thrashing."

Epoch time breakdown across different caching percentages, illustrating the 'thrashing' penalty in standard caching systems.

As GPUs get faster, the compute time shrinks, making the data pipeline the dominant factor. Even on high-end servers like the NVIDIA DGX-2, prep stalls can account for 50% of training time. Furthermore, in hyperparameter searches, the lack of coordination can lead to 7× more disk reads than necessary.

Results and Impact

The study evaluated nine models across tasks like image classification (ImageNet-1K/22K) and audio classification (FMA). Key results include:

  • Significant Speedups: CoorDL achieved up to 5× speedup on a single server compared to NVIDIA DALI.
  • Distributed Efficiency: In multi-server setups using HDDs, CoorDL improved throughput by up to 15× by shifting the bottleneck from I/O to the GPU.
  • Time-to-Accuracy: For ResNet50 on ImageNet, CoorDL reduced the time to reach target accuracy from 2 days to just 12 hours.
  • I/O Reduction: In audio tasks, CoorDL reduced total disk I/O from 3.5 TB to just 550 GB by coordinating data prep across concurrent jobs.

Conclusion

Data stalls represent a major hurdle for efficient DNN training. By recognizing the mismatch between DNN access patterns and OS caching policies, CoorDL provides a specialized solution that significantly improves hardware utilization and reduces training time.

Summary updated

BibTeX
@article{mohan2020analyzing,
  author = {Jayashree Mohan and Amar Phanishayee and Ashish Raniwala and Vijay Chidambaram},
  title = {{Analyzing and Mitigating Data Stalls in DNN Training}},
  journal = {Proc. VLDB Endow.},
  year = {2020},
  doi = {10.14778/3446095.3446100},
}
Figure