TL;DR
This paper tackles the bottleneck of loading massive Earth Observation (EO) datasets from cloud storage to GPUs for deep learning. By systematically optimizing PyTorch data loaders and GeoTIFF file access, they achieve up to a 20x speedup in remote data loading, enabling cloud-based training to match local-disk performance and significantly boosting GPU utilization.
What Problem Does This Paper Address?
Training deep learning models on Earth Observation (EO) data is becoming increasingly challenging due to the sheer scale of these datasets, often reaching petabytes. A major hurdle is efficiently getting this data from cloud storage to the GPUs for processing. Standard deep learning data loaders, like PyTorch's DataLoader, are often optimized for local storage and struggle with the latency inherent in cloud access. This leads to GPUs sitting idle, severely underutilizing expensive hardware and slowing down the entire training process. Downloading entire petabyte-scale datasets locally is also impractical due to storage costs and the need for repeated downloads for experiments. The paper specifically addresses the inefficiencies of loading GeoTIFF files, a common format for EO data, from cloud object storage.
Methods
The authors employ a multi-pronged approach to optimize data loading:
- Benchmarking Framework: They establish a rigorous benchmarking framework to measure GeoTIFF loading throughput.
- Bayesian Optimization: To navigate the vast hyperparameter space of data loader configurations (e.g., number of workers, patch size, compression, prefetching), they use Bayesian optimization. This intelligent search method efficiently identifies promising configurations.
- Grid Search: For deeper analysis of specific hyperparameter interactions, they also perform 2D grid searches.
- Focus on Tile-Aligned Reads: A key innovation is the emphasis on "tile-aligned reads." GeoTIFFs are often tiled internally. Reading data that aligns perfectly with these internal tiles (as opposed to spanning multiple tiles or reading sub-tiles) dramatically reduces the amount of data that needs to be fetched and decompressed. They introduce a
blockedhyperparameter to enforce this. - Worker Thread Pools: They investigate the impact of intra-worker thread pools to hide network latency by issuing multiple concurrent requests.
- Systematic Parameter Testing: They systematically test various compression methods (None, LZW, DEFLATE, LERC-ZSTD), patch sizes, worker counts, and prefetch factors.
Datasets
The paper uses the following datasets for their experiments:
- Sentinel-2: Used for preparing the benchmark dataset. They extract four spectral bands from imagery over Nairobi, Kenya.
- ISPRS Vaihingen Dataset: A benchmark for semantic segmentation, containing high-resolution aerial scenes with three spectral bands and digital surface models.
- Potsdam Dataset: Another semantic segmentation benchmark with high-resolution tiles and four spectral bands.
- IEEE GRSS DFC-22 Dataset: A dataset of RGB imagery from French urban areas, used for segmentation tasks.
They create three versions of these datasets for their experiments: a default version, a local-optimal version, and a remote-optimal version, each with specific GeoTIFF format and loader configurations.
Key Insights and Ideas
- Tile Alignment is Crucial: The most significant finding is the dramatic impact of aligning data reads with the internal tile structure of GeoTIFF files. This simple change can reduce data transfer by up to 4x and is a cornerstone of their optimized configurations.
- Cloud vs. Local Bottlenecks Differ: Optimal configurations for local storage and cloud storage are distinct. Local storage benefits most from eliminating compression overhead, while remote storage gains significantly from scaling up the number of workers to mask network latency.
- Compression Trade-offs: For local storage, uncompressed data is king. However, for remote storage, LERC-ZSTD offers a good balance between file size and decompression speed, making it a strong contender.
- Worker Scaling Dominates Remote Performance: For cloud-based training, increasing the number of workers is far more impactful than increasing threads, as it helps to keep the GPU fed with data despite network latency.
- Optimized Loading Enables Cloud Training: With their optimized configurations, models trained directly from cloud storage achieve comparable accuracy to local-disk training within the same time budget, effectively removing the need for costly local storage.
Key Results
- 20x Remote Throughput Improvement: Optimized configurations achieved up to a 20x increase in remote data loading throughput compared to default settings.
- 4x Local Throughput Improvement: Local data loading throughput was improved by up to 4x.
- 85-95% GPU Utilization: Optimized configurations maintained high GPU utilization (85-95%), a stark contrast to the intermittent, low utilization (0-30%) seen with default settings.
- Comparable Accuracy: Models trained with optimized remote loading achieved the same accuracy as local-disk training within identical time budgets.
- Validation IoU Improvement: They observed a 6-15% improvement in validation IoU on benchmark datasets.
- Optimal Configurations: For local storage, peak throughput was achieved with uncompressed data and 8 workers. For remote storage, optimal performance involved 64 workers and LERC-ZSTD compression.
Limitations and Future Work
- Fixed Data Formats: Public EO archives often use fixed data formats, limiting optimizations to data loading rather than storage format improvements. Transforming data on-the-fly adds infrastructure complexity.
- Tile-Aligned Reads vs. Random Cropping: The emphasis on tile-aligned reads might prevent random cropping during training, which could potentially impact model performance.
- Lossless Compression Focus: The study primarily focuses on lossless compression. Exploring lossy compression trade-offs could offer further benefits.
- GDAL Environment Variables: The impact of GDAL environment variables on read performance was not accounted for.
- Data Center Location: The evaluation assumes data access across different data centers. Co-locating data and compute could further reduce latency.
Future Work: The authors suggest exploring infinite samplers for continuous data fetching, comparing streaming efficiency across various data formats (beyond COG), and advocating for data providers to publish "training-friendly" cloud-native rasters. They also call for standardized performance benchmarks for EO deep learning.
Summary updated