-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-15962][network] Reduce the default chunk size to 4M in netty stack #11421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit ce674a7 (Tue Mar 17 00:56:18 UTC 2020) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
|
@flinkbot run travis |
|
@flinkbot run azure |
zhijiangW
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this following improvement after #7368.
I am a bit concern of introducing two new configuration options related to internal netty stack. My assumption is that most users are lack of expertise to understand these options, and it is really not necessary to adjust them in practice. The additional potential trouble is for maintaining compatible if these options might be changed future.
My suggestion is to only adjust the default value inside NettyBufferPool ATM. We can consider exposing some options if feeling really necessary in future. WDYT?
ce674a7 to
dd9c079
Compare
|
Hi @zhijiangW very thanks for the review! I agree with that we could postpone adding the options. I updated the PR and change the max-order directly, and re-run the e2e test. |
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/netty/NettyBufferPool.java
Outdated
Show resolved
Hide resolved
|
Thanks for the updates, @gaoyunhaii ! The code is generally good to me. I have only one concern. As we known, the default chunk size in netty is 16MB. If we adjust it to a smaller value, it is better to give some reasons why we consider 4MB, not 1MB or other values as default. Another thought is that it might be possible to integrate another |
dd9c079 to
394192b
Compare
394192b to
58a6e5f
Compare
|
Hi @zhijiangW very thanks for the review! I have updated the comments. I will continue checking the NettyBufferPool used in the Queryable State. |
|
@flinkbot run travis |
|
@flinkbot run azure |
zhijiangW
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates @gaoyunhaii ! LGTM!
What is the purpose of the change
Decrease the default Netty chunk size from 16MB to 4MB. Since Netty allocates memory by chunks, a smaller chunk size would decrease the amount of unused direct memory, thus decrease the total direct memory required.
To allow users changes the default behaviors, we also makes the
page sizeandmax orderproperties ofNettyBufferPoolconfigurable.Brief change log
Verifying this change
This change added tests and can be verified as follows:
NettyShuffleMemoryControlTestfrom 20M to 7M and verifies that without the change there will be direct memory OOM exception, and with the change there will be no exception.Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation