Skip to content

Add 32k and 64k size classes to adaptive allocator#15799

Merged
normanmaurer merged 1 commit into
netty:4.2from
chrisvest:4.2-sz-classes-adaptive
Oct 28, 2025
Merged

Add 32k and 64k size classes to adaptive allocator#15799
normanmaurer merged 1 commit into
netty:4.2from
chrisvest:4.2-sz-classes-adaptive

Conversation

@chrisvest
Copy link
Copy Markdown
Member

Motivation:
I've gotten allocation profile data from "a large e-commerce application", which has sizable allocation volume at 32 KiB and 64 KiB, with very little in between that isn't covered by the existing size classes.

Modification:
Add 32 KiB and 64 KiB size classes to the adaptive allocator. Make the adaptiveChunkMustDeallocateOrReuseWthBufferRelease test more size-class agnostic.

Result:
Nearly 50% memory usage reduction in this e-commerce application use case, according to the allocation pattern simulator for the 1024 live buffers case, which brings adaptive on par with the pooled allocator for this use case.

Motivation:
I've gotten allocation profile data from "a large e-commerce application", which has sizable allocation volume at 32 KiB and 64 KiB, with very little in between that isn't covered by the existing size classes.

Modification:
Add 32 KiB and 64 KiB size classes to the adaptive allocator.
Make the adaptiveChunkMustDeallocateOrReuseWthBufferRelease test more size-class agnostic.

Result:
Nearly 50% memory usage reduction in this e-commerce application use case, according to the allocation pattern simulator for the 1024 live buffers case, which brings adaptive on par with the pooled allocator for this use case.
@chrisvest chrisvest added this to the 4.2.8.Final milestone Oct 27, 2025
@chrisvest
Copy link
Copy Markdown
Member Author

Before:

image

After:

image

Copy link
Copy Markdown
Contributor

@franz1981 franz1981 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@normanmaurer normanmaurer merged commit 4a6f31a into netty:4.2 Oct 28, 2025
19 checks passed
normanmaurer pushed a commit that referenced this pull request Oct 28, 2025
Motivation:
I've gotten allocation profile data from "a large e-commerce
application", which has sizable allocation volume at 32 KiB and 64 KiB,
with very little in between that isn't covered by the existing size
classes.

Modification:
Add 32 KiB and 64 KiB size classes to the adaptive allocator. Make the
adaptiveChunkMustDeallocateOrReuseWthBufferRelease test more size-class
agnostic.

Result:
Nearly 50% memory usage reduction in this e-commerce application use
case, according to the allocation pattern simulator for the 1024 live
buffers case, which brings adaptive on par with the pooled allocator for
this use case.
normanmaurer pushed a commit that referenced this pull request Oct 28, 2025
Motivation:
I've gotten allocation profile data from "a large e-commerce
application", which has sizable allocation volume at 32 KiB and 64 KiB,
with very little in between that isn't covered by the existing size
classes.

Modification:
Add 32 KiB and 64 KiB size classes to the adaptive allocator. Make the
adaptiveChunkMustDeallocateOrReuseWthBufferRelease test more size-class
agnostic.

Result:
Nearly 50% memory usage reduction in this e-commerce application use
case, according to the allocation pattern simulator for the 1024 live
buffers case, which brings adaptive on par with the pooled allocator for
this use case.
normanmaurer added a commit that referenced this pull request Oct 28, 2025
Motivation:
I've gotten allocation profile data from "a large e-commerce
application", which has sizable allocation volume at 32 KiB and 64 KiB,
with very little in between that isn't covered by the existing size
classes.

Modification:
Add 32 KiB and 64 KiB size classes to the adaptive allocator. Make the
adaptiveChunkMustDeallocateOrReuseWthBufferRelease test more size-class
agnostic.

Result:
Nearly 50% memory usage reduction in this e-commerce application use
case, according to the allocation pattern simulator for the 1024 live
buffers case, which brings adaptive on par with the pooled allocator for
this use case.

Co-authored-by: Chris Vest <christianvest_hansen@apple.com>
@chrisvest chrisvest deleted the 4.2-sz-classes-adaptive branch October 28, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants