Ray Data: A dynamic and scalable system for heterogeneous data processing
Organizations: UC Berkeley · University of Washington · Anyscale
Abstract
While ML model training and inference are both GPU-intensive, CPU-based data processing is often the bottleneck. Existing distributed data processing systems assume homogeneous resource requirements. They excel at CPU-based computation but either under-utilize heterogeneous resources or impose high overheads on failure and reconfiguration. We introduce Ray Data, a scalable system for heterogeneous workloads spanning batch inference and ML training. The key idea is to combine dynamic task creation for memory efficiency with dynamic task placement for operator elasticity. Making both decisions dynamically allows the system to adapt to heterogeneous pipelines where the memory and compute requirements per operator are unknown and variable over time. Ray Data addresses two challenges: (1) leveraging dynamic task creation for memory-efficient pipelining, and (2) designing a task placement policy that jointly allocates heterogeneous compute and memory resources to maximize throughput while limiting memory usage. Ray Data improves throughput on heterogeneous batch inference pipelines by 2.6-12 compared to traditional data processing systems. By leveraging heterogeneous clusters, Ray Data improves end-to-end training time for multimodal models such as Stable Diffusion by 31% compared to popular ML data loaders.
Figures & tables
| System | Dyn task creation | Dyn task placement | Recovery | Rollback | Heterogeneous clusters |
|---|---|---|---|---|---|
| Batch systems [ 7 , 2 , 44 , 15 ] | Logical log | Task | |||
| Microbatch systems [ 45 , 40 ] | Checkpt+Logical log | Task | |||
| Naiad [ 25 ] , Flink [ 6 ] | Checkpt | Epoch | |||
| MillWheel [ 1 ] , Kafka [ 19 ] | Physical log | Record | |||
| PyTorch DL [ 31 ] | None | Job | |||
| tf.data [ 26 ] | Checkpt | Epoch |
| Method | Description |
|---|---|
| read | Read items from files. |
| map | Transform each item. |
| map_batches | Transform a batch of items. Useful for controlling GPU batch size. |
| flat_map | Transform each item and flatten the results. |
| filter | Return items that match a predicate. |
| limit | Truncate to the first N items. |
Heterogeneous Computing
Heterogeneous computing studies how to coordinate different processors, accelerators, and memory systems to improve performance, efficiency, and cost.
See all 80 papers