Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Oct 24, 2025

What changes were proposed in this pull request?

This PR aims to support a new Netty IO Mode, AUTO, on top of the existing NIO, EPOLL, and KQUEUE.

AUTO mode prefers to use native EPOLL mode on Linux and KQUEUE mode on MacOS if available. Then, it fallbacks to NIO mode.

Why are the changes needed?

To help a user to try to use native IO mode more easily.

Does this PR introduce any user-facing change?

No, this is a new IO mode.

How was this patch tested?

Pass the CIs with newly added test suite, ShuffleNettyAutoSuite.

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions bot added the CORE label Oct 24, 2025
@dongjoon-hyun
Copy link
Member Author

cc @yaooqinn and @LuciferYang

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-54023][CORE] Support AUTO Netty IO Mode [SPARK-54023][CORE] Support AUTO IO Mode Oct 24, 2025
@dongjoon-hyun
Copy link
Member Author

Could you review this PR when you have some time, @viirya and @peter-toth ?

Copy link
Member

@viirya viirya left a comment

Choose a reason for hiding this comment

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

Looks okay.

@dongjoon-hyun
Copy link
Member Author

Thank you so much, @viirya .

Merged to master for Apache Spark 4.1.0-preview3.

@dongjoon-hyun dongjoon-hyun deleted the SPARK-54023 branch October 26, 2025 00:53
Copy link
Contributor

@peter-toth peter-toth left a comment

Choose a reason for hiding this comment

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

Late LGTM.

@LuciferYang
Copy link
Contributor

Late LGTM

@dongjoon-hyun
Copy link
Member Author

Thank you, @peter-toth and @LuciferYang .

@yaooqinn
Copy link
Member

Late LGTM

@dongjoon-hyun
Copy link
Member Author

Thank you, @yaooqinn .

SteNicholas added a commit to apache/celeborn that referenced this pull request Oct 29, 2025
### What changes were proposed in this pull request?

Support native kqueue transport on BSD/MacOS for `celeborn.<module>.io.mode`.

Backport:

- apache/spark#52703
- apache/spark#52724

### Why are the changes needed?

Netty provides the following platform specific JNI transports for [native transports](https://netty.io/wiki/native-transports.html):

- Linux (since 4.0.16)
- MacOS/BSD (since 4.1.11)

These JNI transports add features specific to a particular platform, generate less garbage, and generally improve performance when compared to the NIO based transport.

### Does this PR introduce _any_ user-facing change?

Change the default value of `celeborn.<module>.io.mode` from `NIO` to `EPOLL` if epoll mode is available, from `NIO` to `KQUEUE` if kqueue mode is available, falling back to `NIO` otherwise.

### How was this patch tested?

CI.

Closes #3518 from SteNicholas/CELEBORN-2185.

Authored-by: SteNicholas <[email protected]>
Signed-off-by: SteNicholas <[email protected]>
Yicong-Huang pushed a commit to Yicong-Huang/spark that referenced this pull request Oct 30, 2025
### What changes were proposed in this pull request?

This PR aims to support a new Netty IO Mode, `AUTO`, on top of the existing `NIO`, `EPOLL`, and `KQUEUE`.

`AUTO` mode prefers to use native `EPOLL` mode on Linux and `KQUEUE` mode on MacOS if available. Then, it fallbacks to `NIO` mode.

### Why are the changes needed?

To help a user to try to use native IO mode more easily.

### Does this PR introduce _any_ user-facing change?

No, this is a new IO mode.

### How was this patch tested?

Pass the CIs with newly added test suite, `ShuffleNettyAutoSuite`.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes apache#52724 from dongjoon-hyun/SPARK-54023.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants