Skip to content

[Data] Specify logical memory for read_large_parquet - #63818

Merged
bveeramani merged 1 commit into
masterfrom
fix-read-large-parquet
Jun 3, 2026
Merged

bveeramani merged 1 commit into
masterfrom
fix-read-large-parquet

Conversation

@bveeramani

@bveeramani bveeramani commented Jun 3, 2026 •

Copy link
Copy Markdown
Member

The read_large_parquet frequently OOMs.

This isn't totally unexpected -- Parquet reads allocate lots of memory because of apache/arrow#39808, and the current implementation of Ray Data can't guarantee memory safety unless you specify the heap memory required for high-memory operations.

Since this is a case where we expect the system to need a hint, I've updated the release test to specify 3.4 GiB of heap memory for reads. This was the maximum heap usage per task I observed in the latest release test run.

I've also re-introduced the ratchet that fails the release test on OOMs. If the system upholds its guarantee that it doesn't OOM when you specify the required heap memory, this shouldn't fail anymore.

Signed-off-by: Balaji Veeramani <[email protected]>

@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 introduces a --memory command-line argument to the read and consume benchmark script, allowing logical memory to be passed to the read function. This argument is then utilized in the release data tests configuration for Parquet benchmarks to prevent OOM errors, alongside the removal of several OOM-ignoring environment variables. The review feedback suggests conditionally applying functools.partial only when the --memory argument is explicitly provided to avoid unnecessary wrapping.

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.

assert False, f"Invalid data format argument: {args}"

return read_fn
return functools.partial(read_fn, memory=args.memory)

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.

medium

To avoid unnecessary wrapping with functools.partial and explicitly passing memory=None when the --memory argument is not provided, we can conditionally apply functools.partial only when args.memory is not None.

Suggested change
return functools.partial(read_fn, memory=args.memory)
if args.memory is not None:
return functools.partial(read_fn, memory=args.memory)
return read_fn

@ray-gardener ray-gardener Bot added data Ray Data-related issues release-test release test labels Jun 3, 2026
@bveeramani bveeramani added the go add ONLY when ready to merge, run all tests label Jun 3, 2026

@Kunchd Kunchd 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.

Nice even closer to 0 OOMs!

@bveeramani
bveeramani merged commit aaf225a into master Jun 3, 2026
5 checks passed
@bveeramani
bveeramani deleted the fix-read-large-parquet branch June 3, 2026 21:04
rueian pushed a commit to rueian/ray that referenced this pull request Jun 4, 2026
…3818)

The `read_large_parquet` frequently OOMs. 

This isn't totally unexpected -- Parquet reads allocate lots of memory
because of apache/arrow#39808, and the current
implementation of Ray Data can't guarantee memory safety unless you
specify the heap memory required for high-memory operations.

Since this is a case where we expect the system to need a hint, I've
updated the release test to specify 3.4 GiB of heap memory for reads.
This was the maximum heap usage per task I observed in the latest
release test run.

I've also re-introduced the ratchet that fails the release test on OOMs.
If the system upholds its guarantee that it doesn't OOM when you specify
the required heap memory, this shouldn't fail anymore.

Signed-off-by: Balaji Veeramani <[email protected]>
limarkdcunha pushed a commit to limarkdcunha/ray that referenced this pull request Jun 30, 2026
…3818)

The `read_large_parquet` frequently OOMs. 

This isn't totally unexpected -- Parquet reads allocate lots of memory
because of apache/arrow#39808, and the current
implementation of Ray Data can't guarantee memory safety unless you
specify the heap memory required for high-memory operations.

Since this is a case where we expect the system to need a hint, I've
updated the release test to specify 3.4 GiB of heap memory for reads.
This was the maximum heap usage per task I observed in the latest
release test run.

I've also re-introduced the ratchet that fails the release test on OOMs.
If the system upholds its guarantee that it doesn't OOM when you specify
the required heap memory, this shouldn't fail anymore.

Signed-off-by: Balaji Veeramani <[email protected]>
400Ping pushed a commit to 400Ping/ray that referenced this pull request Aug 18, 2026
…3818)

The `read_large_parquet` frequently OOMs.

This isn't totally unexpected -- Parquet reads allocate lots of memory
because of apache/arrow#39808, and the current
implementation of Ray Data can't guarantee memory safety unless you
specify the heap memory required for high-memory operations.

Since this is a case where we expect the system to need a hint, I've
updated the release test to specify 3.4 GiB of heap memory for reads.
This was the maximum heap usage per task I observed in the latest
release test run.

I've also re-introduced the ratchet that fails the release test on OOMs.
If the system upholds its guarantee that it doesn't OOM when you specify
the required heap memory, this shouldn't fail anymore.

Signed-off-by: Balaji Veeramani <[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 release-test release test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants