Skip to content

[SPARK-38541][BUILD] Upgrade Netty to 4.1.75 - #35835

Closed
LuciferYang wants to merge 9 commits into
apache:masterfrom
LuciferYang:upgrade-netty-4175
Closed

LuciferYang wants to merge 9 commits into
apache:masterfrom
LuciferYang:upgrade-netty-4175

Conversation

@LuciferYang

@LuciferYang LuciferYang commented Mar 13, 2022 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This pr aims to upgrade netty to 4.1.75 and this pr add the explicit dependency on netty-tcnative-classes because the dependency on netty-tcnative-classes is changed to Optional in netty.

Why are the changes needed?

The release notes as follows:

There are 2 import changes in this version and both of these changes are to reduce memory-overhead:

Does this PR introduce any user-facing change?

Yes, all changes are caused by the change of Netty.
If the user wants to maintain the same behavior as the previous version, the user needs to make the following configuration:

  • add -Dio.netty.allocator.useCacheForAllThreads=true to enable useCacheForAllThreads
  • add -Dio.netty.allocator.maxOrder=11 to keep the chunk size of PooledByteBufAllocator to 16m

How was this patch tested?

Pass GA

@LuciferYang LuciferYang changed the title [SPARK-38541][BUILD] Upgrade Netty to 4.1.75 [WIP][SPARK-38541][BUILD] Upgrade Netty to 4.1.75 Mar 13, 2022
@LuciferYang
LuciferYang marked this pull request as draft March 13, 2022 10:30
// `PooledByteBufAllocator` chunk size reduce from 16 MiB to 4 MiB, we need use
// `-Dio.netty.allocator.maxOrder=11` to keep the chunk size of PooledByteBufAllocator to 16m.
// 2. `PooledByteBufAllocator.defaultUseCacheForAllThreads()` change from true to false, we need
// to use `-Dio.netty.allocator.useCacheForAllThreads=true` to enable `useCacheForAllThreads`.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since the default values of PooledByteBufAllocator.defaultMaxOrder() and PooledByteBufAllocator.defaultUseCacheForAllThreads() are changed after Netty 4.1.75, the PooledByteBufAllocator returned by this method change to disabled useCacheForAllThreads as default and the chunk size of PooledByteBufAllocator reduce from 16 MiB to 4 MiB.

I'd like to know what you think of this @srowen @HyukjinKwon

@LuciferYang LuciferYang changed the title [WIP][SPARK-38541][BUILD] Upgrade Netty to 4.1.75 [SPARK-38541][BUILD] Upgrade Netty to 4.1.75 Mar 13, 2022
@LuciferYang
LuciferYang marked this pull request as ready for review March 13, 2022 10:50

@dongjoon-hyun dongjoon-hyun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The change looks like a little tricky at this time. Do we need this in Apache Spark 3.3? Otherwise, I'd recommend to hold on until @MaxGekk cut the branch-3.3.

@LuciferYang
LuciferYang marked this pull request as draft March 15, 2022 04:01
@LuciferYang

Copy link
Copy Markdown
Contributor Author

The change looks like a little tricky at this time. Do we need this in Apache Spark 3.3? Otherwise, I'd recommend to hold on until @MaxGekk cut the branch-3.3.

@dongjoon-hyun Agree with you. I also think we should discuss this issue after cut branch-3.3. I convert it to draft first to avoid false merging

@LuciferYang LuciferYang changed the title [SPARK-38541][BUILD] Upgrade Netty to 4.1.75 [WIP][SPARK-38541][BUILD] Upgrade Netty to 4.1.75 Mar 15, 2022

@srowen srowen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks OK for 3.4.0

@LuciferYang
LuciferYang marked this pull request as ready for review March 17, 2022 02:33
@LuciferYang LuciferYang changed the title [WIP][SPARK-38541][BUILD] Upgrade Netty to 4.1.75 [SPARK-38541][BUILD] Upgrade Netty to 4.1.75 Mar 17, 2022
@LuciferYang

Copy link
Copy Markdown
Contributor Author

Convert to ready for review because master is already 3.4.0

@srowen

srowen commented Mar 19, 2022

Copy link
Copy Markdown
Member

Merged to master

@srowen srowen closed this in 56086cb Mar 19, 2022
@dongjoon-hyun

Copy link
Copy Markdown
Member

Thank you, @LuciferYang and @srowen .

@LuciferYang

Copy link
Copy Markdown
Contributor Author

thanks all

@LuciferYang
LuciferYang deleted the upgrade-netty-4175 branch October 23, 2023 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants