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

Vertx pooled allocator should be the same as Netty #5168

Open
franz1981 opened this issue Mar 26, 2024 · 0 comments
Open

Vertx pooled allocator should be the same as Netty #5168

franz1981 opened this issue Mar 26, 2024 · 0 comments
Labels

Comments

@franz1981
Copy link
Contributor

franz1981 commented Mar 26, 2024

Currently, in vertx

public static final ByteBufAllocator POOLED_ALLOCATOR = new PooledByteBufAllocator(true);
is NOT reusing the Netty's PooledByteBufAllocator.DEFAULT, causing creation of more thread-local direct buffers and arenas, enlarging the RSS footprint of vertx application, for no reason.

What's the reason behind this choice @vietj?

The reason why it should be changed, is to "ease" the life of users and libraries which allocate Netty direct buffers using the Netty one and can end up allocating new arenas because of this.

If the aforementioned pool re-use the Netty one, clearly is getting some additional contention, but will save memory, which seems a reasonable trade-off.

@franz1981 franz1981 added the bug label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant