Skip to content
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

[performance][Logstash] Change Netty's based plugins to use JavaHeap instead of Direct #16042

Open
1 of 3 tasks
andsel opened this issue Mar 28, 2024 · 0 comments
Open
1 of 3 tasks

Comments

@andsel
Copy link
Contributor

andsel commented Mar 28, 2024

Considerations

Netty plugins uses Direct memory to allocate buffers to process data, however when byte arrays resides on direct space, there isn't any mechanism to track down to the root that retains most of the memory, when leaks or an OOM error happens.
To make more evident in heap profiling dumps, would be ideal to leverage Java Heap allocation of such buffers.

After some testing, using just Java Heap buffers, under heavy load on Logstash, didn't shown any performance degradation.

Plugins Impacted

  • Beats Input
  • HTTP Input
  • TCP Input

Related Issues

Proposal

Provide a global setting that can enable disable the selection to allocate Netty buffers from direct vs java heap. The setting should implicitly configure the Netty's properties that command the kinds of allocation (-Dio.netty.allocator.numDirectArenas=0
-Dio.netty.noPreferDirect=true).
Initially this behaviour would be disabled by default, so that a user can opt-in for such feature. In a later release the flag could be enabled by default.

Tasks

  1. andsel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant