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

[FEATURE] [transport-netty4] Investigate support of the direct buffers by default #17413

Open
reta opened this issue Feb 21, 2025 · 2 comments
Open
Labels
enhancement Enhancement or improvement to existing feature or request Other

Comments

@reta
Copy link
Collaborator

reta commented Feb 21, 2025

Is your feature request related to a problem? Please describe

While working on #17408, we found out that some compression codecs (fe ZstdEncoder) use direct buffers unconditionally. The default NettyAllocator::ALLOCATOR is NoDirectBuffers and does not support direct buffers.

Describe the solution you'd like

  • Understand why NoDirectBuffers had been chosen as the default
  • Consider supporting direct buffers by default

Related component

Other

Describe alternatives you've considered

N/A

Additional context

@reta reta added enhancement Enhancement or improvement to existing feature or request untriaged labels Feb 21, 2025
@github-actions github-actions bot added the Other label Feb 21, 2025
@kkewwei
Copy link
Contributor

kkewwei commented Feb 28, 2025

NoDirectBuffers is mainly used in network, while Every thread has it's own DirectByteBuffert to use, there seems no need to create the directArena in PoolThreadCache
(https://github.com/opensearch-project/OpenSearch/blob/main/modules/transport-netty4/src/main/java/org/opensearch/transport/CopyBytesSocketChannel.java),

The purpose of this class is to allow the disabling of netty direct buffer pooling while allowing us to control how bytes end up being copied to direct memory.

@andrross
Copy link
Member

Catch All Triage - 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement or improvement to existing feature or request Other
Projects
None yet
Development

No branches or pull requests

3 participants