Skip to content

broker: size List response chunks to fit gRPC's 32KB buffer pool tier#466

Merged
williamhbaker merged 1 commit intomasterfrom
wb/list-response-size
Apr 7, 2026
Merged

broker: size List response chunks to fit gRPC's 32KB buffer pool tier#466
williamhbaker merged 1 commit intomasterfrom
wb/list-response-size

Conversation

@williamhbaker
Copy link
Copy Markdown
Contributor

@williamhbaker williamhbaker commented Apr 7, 2026

Reduce maxJournalsPerListResponse from 1000 to 25 so that marshaled ListResponse messages stay within the 32KB gRPC buffer pool tier.

At typical journal sizes (~750-1300 bytes per ListResponse_Journal), 25 journals produces messages of ~19-32KB. Previously, larger chunks produced messages > 32 KB, landing in the 1MB buffer pool tier. When many List watch streams sent responses concurrently, this caused significant memory spikes from pooled 1MB buffers.

Reduce maxJournalsPerListResponse from 1000 to 25 so that marshaled
ListResponse messages stay within the 32KB gRPC buffer pool tier.

At typical journal sizes (~750-1300 bytes per ListResponse_Journal), 25
journals produces messages of ~19-32KB. Previously, larger chunks
produced messages > 32 KB, landing in the 1MB buffer pool tier. When
many List watch streams sent responses concurrently, this caused
significant memory spikes from pooled 1MB buffers.
Copy link
Copy Markdown
Contributor

@jgraettinger jgraettinger left a comment

Choose a reason for hiding this comment

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

LGTM

@williamhbaker williamhbaker merged commit 95fb59e into master Apr 7, 2026
1 check passed
@williamhbaker williamhbaker deleted the wb/list-response-size branch April 7, 2026 18:00
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.

2 participants