-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Set Netty's maxOrder options to previous default #15925
Conversation
…ff the user hans't specified anything in his option (both file or LS_JVM_OPTS environment variable)
… to startup Logstash
Quality Gate failedFailed conditions1 New issue See analysis details on SonarQube Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
💚 Build Succeeded
History
cc @andsel |
Note for reviewer: the SonarCube report is failing because no tests are run on the |
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.
Tested manually, LGTM
Please open an issue about this, we should fix it, the jvm options parser is self contained enough that running these tests should be done at the PR level |
#15927 to handle the testing on PR CI |
@logstashmachine backport 8.12 |
Updates Netty's configuration of maxOrder to a previously proven value, if not already customised by the user. Adds a step to the JvmOption parsing tool, which is used to compose the JVM options string to pass down to Logstash at startup. The added step rework the parsed options to set the allocator max order -Dio.netty.allocator.maxOrder=11 so that the maximum pooled buffer is up to 16MB and not 4MB. This option is added iff it's not yet specified by the user (cherry picked from commit 52ce3ff)
@logstashmachine backport 7.17 |
…default (#15928) Updates Netty's configuration of maxOrder to a previously proven value, if not already customised by the user. Adds a step to the JvmOption parsing tool, which is used to compose the JVM options string to pass down to Logstash at startup. The added step rework the parsed options to set the allocator max order -Dio.netty.allocator.maxOrder=11 so that the maximum pooled buffer is up to 16MB and not 4MB. This option is added iff it's not yet specified by the user (cherry picked from commit 52ce3ff) Co-authored-by: Andrea Selva <selva.andre@gmail.com>
Release notes
Updates Netty's configuration of maxOrder to a previously proven value, if not already customised by the user.
What does this PR do?
Adds a step to the JvmOption parsing tool, which is used to compose the JVM options string to pass down to Logstash at startup.
The added step rework the parsed options to set the allocator max order
-Dio.netty.allocator.maxOrder=11
so that the maximum pooled buffer is up to 16MB and not 4MB.This option is added iff it's not yet specified by the user
Why is it important/What is the impact to the user?
It brings back the performance of Netty based plugins to the same as of Logstash previous of
8.7.0
, which introduced an update of Netty library.With messages bigger then 2Kb each it triggered a problem of using unpooled buffers, which kills performance. With this change it moved back to 8Kb.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files (and/or docker env variables)Author's Checklist
How to test this PR locally
The test splits in 2, verify that the line
-Dio.netty.allocator.maxOrder=11
is added when the flag is not inconfig/jvm.options
and verify that if the flag is already present it's not overwritten.Run Logstash with
bin/logstash -e "input {stdin {}} output {stdout{}}"
-second test: edit
config/jvm.options
and add a customio.netty.allocator.maxOrder
, start Logstash and verify logs contains the definition was added.Related issues
Use cases
Screenshots
Logs