Abstract
The utilization of supercomputers and large clusters for big-data processing has recently gained immense popularity, primarily due to the widespread adoption of Graphics Processing Units (GPUs) to execute iterative algorithms, such as Deep Learning and 2D/3D imaging applications. This trend is especially prominent in the context of large-scale datasets, which can range from hundreds of gigabytes to several terabytes in size. Similar to the field of Deep Learning, which deals with datasets of comparable or even greater sizes (e.g. LION-3B), these efforts encounter complex challenges related to data storage, retrieval, and efficient GPU utilization. In this work, we benchmarked a collection of high-performance general dataloaders used in Deep Learning with a dual focus on user-friendliness (Pythonic) and high-performance execution. These dataloaders have become crucial tools. Notably, advanced dataloading solutions such as Web-datasets, FFCV, and DALI have demonstrated significantly superior performance when compared to traditional PyTorch general data loaders. This work provides a comprehensive benchmarking analysis of high-performance general dataloaders tailored for handling extensive datasets within supercomputer environments. Our findings indicate that DALI surpasses our baseline PyTorch dataloader by up to 3.4x in loading times for datasets comprising one million images.
Introduction
In the era of "data-hungry" models like Vision Transformers, training sets have ballooned from gigabytes to several terabytes (e.g., LAION-5B). While GPUs have become incredibly fast at processing data, the systems responsible for delivering that data—the dataloaders—often cannot keep up. This creates "data stalls," where expensive GPUs sit idle while waiting for the storage system to fetch, decode, and augment images. Previous research suggests these stalls can account for up to 65% of total training time. This study aims to identify which modern dataloading library best minimizes these bottlenecks in a high-performance computing (HPC) environment.
Methodology and Infrastructure
The researchers conducted a comparative analysis of four dataloading approaches on the ABCI supercomputer using NVIDIA V100 nodes:
- PyTorch (Baseline): The standard approach, which often struggles with high-frequency I/O requests across a network.
- Webdatasets: A library that stores data in POSIX tar archives ("shards"), allowing for efficient streaming and reducing the number of individual file opens.
- FFCV (Fast Forward Computer Vision): Uses a proprietary
.betonbinary format and heavy caching to maximize throughput. - NVIDIA DALI: A library designed to offload data augmentation (resizing, cropping, etc.) to the GPU itself.
The study utilized FractalDB, a synthetic dataset consisting of 1 million grayscale images divided into 1,000 classes. Synthetic data allows for the generation of complex datasets without the privacy or copyright concerns associated with large-scale real-world data. Pre-processing requirements varied significantly: converting the dataset for Webdatasets took ~1.5 hours, while FFCV’s conversion took ~8 hours. Notably, DALI requires no such conversion.
Performance Analysis
The benchmarks revealed a significant "Network Tax" when loading data over a network (NFS) compared to a local SSD. Moving the dataset to a local SSD cut PyTorch's loading time for a single batch from 68 seconds to 30 seconds.
Overall, NVIDIA’s DALI emerged as the top performer, achieving a 3.4x speedup over the PyTorch baseline when loading the full 1-million-image epoch. On a local SSD, the baseline PyTorch loader took 5 minutes to process the full dataset, whereas DALI completed the same task in approximately 1 minute and 7 seconds. FFCV performed best with a 10% JPEG compression ratio, loading the dataset in under 3 minutes. While Webdatasets showed competitive speeds in specific configurations, its performance was more sensitive to shard management compared to DALI’s streamlined pipeline.
Conclusion
While advanced loaders like FFCV offer high throughput, their substantial pre-processing overhead and integration complexity remain hurdles for researchers. DALI provides a superior balance of performance and ease of use by leveraging the GPU for on-the-fly transformations without requiring dataset conversion. Future work will explore direct-to-RAM loading and multi-node scaling to further eliminate data stalls in distributed training environments.
Summary updated