HDDS-11234. Manage Netty native memory consumption#10354
Closed
smengcl wants to merge 1 commit into
Closed
Conversation
jojochuang
approved these changes
May 26, 2026
Comment on lines
+1423
to
+1426
| # Opt-in caps on Netty's pooled direct-memory arena (HDDS-11234). Two | ||
| # properties are needed because Ozone runs both the unshaded io.netty | ||
| # *and* the Ratis-shaded copy in the same JVM, each with its own | ||
| # independent ceiling. |
Contributor
Author
|
I'm closing this one atm to wait for #10030 to land then. cc @yandrey321 |
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.
What changes were proposed in this pull request?
Adds two opt-in env vars in
ozone_java_setupto cap Netty's pooled direct memory:OZONE_NETTY_MAX_DIRECT_MEMORYsets-Dio.netty.maxDirectMemory=<bytes>(unshadedio.netty, used by S3G/gRPC).OZONE_RATIS_NETTY_MAX_DIRECT_MEMORYsets-Dorg.apache.ratis.thirdparty.io.netty.maxDirectMemory=<bytes>(Ratis-shaded copy, used by DN write/replication).Two variables are needed because the unshaded and Ratis-shaded Netty classes have independent allocators, each defaulting to
≈ -Xmx— so the implicit per-process ceiling is roughly2 × -Xmxof direct memory.Both env vars are unset by default. No behavior change unless operators set them.
Companion docs PR in
apache/ozone-siteaddsdocs/06-troubleshooting/17-netty-direct-memory.md: apache/ozone-site#448What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-11234
How was this patch tested?
-Dlands in the correctOPTSvar.