-
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
Add global setting to that changes the behavior to use Heap memory - affects beats, http and tcp input #16051
Comments
I am not against a global opt-in flag, but I think there is some danger lurking here. Currently the netty jars are provided separately by each of the plugins that rely on them, and since they are loaded into the ruby runtime I believe we effectively have no guarantees about which set of jars are loaded at runtime. Upon first-use, netty does some platform-dependent capabilities-detection and pairs that with system properties that are present to determine global defaults. We rely on these implicit defaults in each of the above-mentioned plugins. I am a little wary of propagating a I believe that the plugins could each use We could introduce a If we wish to introduce the global flag quickly, and to defer the work of breaking out the shared dependency, then we should implement the flag in a way that doesn't preclude that future effort and doesn't bind us more-tightly with netty's internals, something like:
|
Thank's @yaauie to chime in! I like the proposal to have a more structured and stable behaviour then relying on system properties, but as first step we could implement in the ugly way , using the system properties. We know that plugin's dependencies are loaded by JRuby when the plugin start, so on the bootstrapping phase of Logstash runner we are quite sure that Netty classes hasn't yet been loaded and we are still in time to set "our" system properties to configure it. In a second phase of development we could introduce the netty-support dependency and adjust all the interested plugins, and later improve such support plugin to handle the allocator on a more fine grained way. |
Absolutely. My suggestion is to make the interface for configuring this (a setting named like |
Add a setting in
logstash.yml
that permit to the user to enable or disable the Java Heap allocation, instead of Direct memory, for buffers used by Netty related plugins.This setting, off by default, requires explicit opt-in from user. Once it's switched on all Netty's plugins instances (like
logstash-input-beats
logstash-input-http
logstash-input-tcp
) will allocated buffers on Java heap.This permit to better tracking on OOM heap dump the most demanding consumers of byte buffers, and spot easily memory problems.
The text was updated successfully, but these errors were encountered: