Skip to content

[Data] Set runtime_env var for shuffle reduce tasks prevent Ray OOM worker kill on map_groups_autoscaling release test - #64737

Merged
bveeramani merged 7 commits into
ray-project:masterfrom
ayushk7102:revert_shuffle_join
Jul 16, 2026
Merged

bveeramani merged 7 commits into
ray-project:masterfrom
ayushk7102:revert_shuffle_join

Conversation

@ayushk7102

@ayushk7102 ayushk7102 commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Description

The map_groups_autoscaling_hash_shuffle_* nightly release test started failing with worker OOM kills on _shuffle_reduce_task, beginning after #64538, which removed setting max_calls=1 on the remote task to alleviate the performance regressions on join tests.
In order to circumvent this issue, we can give reduce tasks their own dedicated worker pool via runtime_env

We isolate the shuffle reduce tasks into running on their own pool of workers (mirroring the same isolation done on the shuffle map tasks in

_SHUFFLE_MAP_RUNTIME_ENV = {"env_vars": {"RAY_DATA_SHUFFLE_MAP_WORKER": "1"}}
)

Related issues

Additional information

@ayushk7102 ayushk7102 added go add ONLY when ready to merge, run all tests air-component labels Jul 14, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds max_calls=1 to the @ray.remote decorator of _shuffle_reduce_task. The reviewer points out that this will cause severe performance degradation and worker churn by restarting the worker process after every task, and suggests reverting this change to address any underlying memory issues more efficiently.

@ayushk7102 ayushk7102 changed the title [DRAFT][DO-NOT-MERGE][Data] max calls = 1 to try and prevent heap memory OOM in workers [Data] Set runtime_env var for shuffle reduce tasks prevent Ray OOM worker kill on map_groups_autoscaling release test Jul 14, 2026
@ayushk7102
ayushk7102 marked this pull request as ready for review July 14, 2026 19:04
@ayushk7102
ayushk7102 requested a review from a team as a code owner July 14, 2026 19:04
@ray-gardener ray-gardener Bot added data Ray Data-related issues release-test release test labels Jul 14, 2026
@bveeramani
bveeramani merged commit daa7b04 into ray-project:master Jul 16, 2026
5 checks passed
400Ping pushed a commit to 400Ping/ray that referenced this pull request Aug 18, 2026
…orker kill on map_groups_autoscaling release test (ray-project#64737)

## Description
The `map_groups_autoscaling_hash_shuffle_*` nightly release test started
failing with worker OOM kills on `_shuffle_reduce_task`, beginning after
ray-project#64538, which removed setting `max_calls=1` on the remote task to
alleviate the performance regressions on join tests.
In order to circumvent this issue, we can give reduce tasks their own
dedicated worker pool via `runtime_env`

We isolate the shuffle reduce tasks into running on their own pool of
workers (mirroring the same isolation done on the shuffle map tasks in
https://github.com/ray-project/ray/blob/bb3934d01ca5bd4c88cc66326a32e7c364ffeff9/python/ray/data/_internal/execution/operators/hash_shuffle_v2.py#L15)
## Related issues

## Additional information

---------

Signed-off-by: Ayush Kumar <[email protected]>
Signed-off-by: 400Ping <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data Ray Data-related issues go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants