[improve][broker] Update netty allocator default chunk size from 4MB to 8MB#25274
Open
geniusjoe wants to merge 1 commit intoapache:masterfrom
Open
[improve][broker] Update netty allocator default chunk size from 4MB to 8MB#25274geniusjoe wants to merge 1 commit intoapache:masterfrom
geniusjoe wants to merge 1 commit intoapache:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main Issue: #25021
Motivation
Netty changed the default chunk size from 16M to 4M in version 4.1.76. The primary reason was that the Netty community believed that in most scenarios, each PoolArena does not require very large chunk sizes, as it could easily lead to wasted memory resources in this pr netty/netty#12108, , which I think is not very suitable for pulsar use case:
In practice, the Logstash community also already reverted it back to the original default value of 16MB. elastic/logstash#15765
Modifications
Refer to comment #25021 (comment):
In order to maintain compatibility with versions prior to Netty 4.1.76 as much as possible, and to improve chunk utilization (where the chunk size exceeds the default maximum single message size of 5 MB), the Netty configuration
-Dio.netty.allocator.maxOrder=10is added inpulsar.envto set the chunk size to 8 MB.Verifying this change
This change added tests and can be verified as follows:
testDefaultChunkSizeMatchesMaxOrder10
Does this pull request potentially affect one of the following parts:
Documentation
docdoc-requireddoc-not-neededdoc-complete