[Data] Decrease downstream backpressure ratio to 2.0#64352
Conversation
Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
There was a problem hiding this comment.
Code Review
This pull request updates the default downstream capacity backpressure ratio (DEFAULT_DOWNSTREAM_CAPACITY_BACKPRESSURE_RATIO) in python/ray/data/context.py from 10.0 to 2.0. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
justinvyu
left a comment
There was a problem hiding this comment.
Checked the training ingest test results and they look good. High leverage change alert
🚢
training_ingest_regression_test.peak_object_store_memory
| Metric | Master | PR | Δ (%) | Verdict |
|---|---|---|---|---|
| peak obj store (GiB) | 75.14 ± 1.88 | 70.65 ± 1.80 | −4.49 (−6.0%) | win |
| throughput (rows/s) | 473.2 ± 1.9 | 470.36 ± 1.74 | −2.84 (−0.6%) | flat (noise) |
training_ingest_regression_test.throughput
| Metric | Master | PR | Δ (%) | Verdict |
|---|---|---|---|---|
| peak obj store (GiB) | 58.09 ± 1.47 | 52.10 ± 0.76 | −5.99 (−10.3%) | win |
| throughput (rows/s) | 1279.6 ± 31.0 | 1376.0 ± 27.2 | +96.4 (+7.5%) | win |
| next-batch (ms) | 49.42 ± 19.93 | 39.22 ± 14.21 | −10.2 (−20.6%) | favorable (noisy) |
|
Before you merge, can you add another picture of the "operator time spent in downstream capacity backpressure" + "bytes output by operator" dashboard metrics before/after this PR for a release test that heavily improved? Ex: Purpose is to sanity check the expected behavior change from this change. |


By default, Ray Data applies
DownstreamCapacitybackpressure once an operator queues up 10x as much data as the downstream operator uses. This conservative default causes Ray Data to queue up more objects than it would otherwise need to.In this PR, I'm ratcheting down the default from 10 to 2.
@yuhuan130 performed a grid search over different values to find the value that uses the least amount of object store memory while not causing regressions. In his experiments, he found 1 to be the best value. You can see some of his results here: https://docs.google.com/spreadsheets/d/1_OGToIZpk-8HOy7fqn6QmuBRBisEBIRDOhYWgFL434U/edit?gid=0#gid=0.
Since there might be unknown unknown with changing this default, I'm more conservatively setting the value to 2 rather than 1.
Results
tl;dr: 10-25% peak memory usage across linear workloads with no meaningful runtime regressions.
Peak memory
image_embedding_from_jsonl_fixed_sizelarge_image_embedding.rayimage_embedding_from_jsonl_autoscalingmix.8ds_equal_random_mixmix.8ds_power_law_random_mixread_parquet_fixed_sizeaudio_transcription.raytraining_ingest_benchmark.s3_parquet_cpuvideo_object_detection.rayread_from_uris_autoscalingiter_torch_batchesRuntime
large_image_embedding.raycross_az_map_batches_autoscaling.gcedistributed_training.chaosworker_scaling_5000_tasks_1opsflat_mapmapcross_az_map_batches_autoscaling.awsimage_embedding_from_jsonl_fixed_sizeimage_classification_from_parquet_autoscalingRuntime regressions
I've manually verified that these are all noise (e.g., autoscaling and read tests have high variance).
streaming_split.regularread_from_uris_fixed_sizeread_parquet_fixed_sizeimage_embedding_from_jsonl_autoscalingread_tfrecordsaudio_transcription.raycount_parquet_autoscalingvideo_object_detection.rayread_from_uris_autoscaling