-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Deprecate Pooled Direct Netty Buffers #47782
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
Deprecate Pooled Direct Netty Buffers #47782
Conversation
Pooled direct Netty buffers can destabilize ES easily starting in v7.4.0 due to the move to Netty 4.1.38 which uses direct buffers for all IO allocations by default. If you don't have direct buffer pooling disabled you won't run the new IO path from elastic#44837 and large messages (e.g. huge bulk requests) will cause allocation of unpooled direct byte buffers of the size of the message and will often lead to the cluster slowly going OOM. People who upgrade their ES cluster but keep their jvm.options file won't have the now default `-Dio.netty.allocator.numDirectArenas=0` set and might run into memory trouble.
|
Pinging @elastic/es-distributed (:Distributed/Network) |
Tim-Brooks
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.
LGTM - but lets have @ywelsch or @jasontedor confirm that this makes sense. It is kind of weird to deprecate a system property that we have never really had an official stance on using/not using. But I agree that some dangerous logging makes sense.
|
We could also put this back into |
True. My suggestion would be to simply warn now because that's the least intrusive change and then simply remove the option of using this setting to go through the old IO path in |
|
This is superseded by #47956, right? |
|
Right :) -> closing. |
Pooled direct Netty buffers can destabilize
ES easily starting in v7.4.0 due to the move
to Netty 4.1.38 which uses direct buffers for
all IO allocations by default.
If you don't have direct buffer pooling disabled
you won't run the new IO path from #44837 and
large messages (e.g. huge bulk requests) will cause
allocation of unpooled direct byte buffers of the
size of the message and will often lead to the
cluster slowly going OOM.
People who upgrade their ES cluster but keep their old
jvm.options file won't have the now default
-Dio.netty.allocator.numDirectArenas=0set and might run into memory trouble.
See this discuss issue for example of bad behavior with direct buffers in
7.4: https://discuss.elastic.co/t/cluster-constantly-crashing-after-upgrade-to-7-4/202580