Conversation
Fine tune the multi's transfer table initial size and growth increments: - change initial capacity from 512 to 128 - lower the amount of unused entries to trigger growth from a 4th to an 8th of the capacity - grow capacity by 50% inside limits of [128, 2048] This lets 100 transfers run without need to regrowth and performs less reallocations for larger parallelism. On 64-bit architectures, the 2048 growth limits grows the table by 16KB which seems a good chunk and prevents over-large growth.
bagder
approved these changes
Aug 27, 2026
There was a problem hiding this comment.
Pull request overview
This PR tunes the sizing strategy for the multi handle’s multi->xfers transfer table to reduce memory footprint at startup and adjust when/how the table grows under higher parallelism.
Changes:
- Reduce the default transfer table initial capacity from 512 to 128.
- Change the growth trigger threshold from ~25% free rows to ~12.5% free rows.
- Update the growth step to add ~50% capacity (bounded to a +[128, 2048] row increment) while staying within
UINT_MAX - 1.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fine tune the multi's transfer table initial size and growth increments:
This lets 100 transfers run without need to regrowth and performs less reallocations for larger parallelism.
On 64-bit architectures, the 2048 growth limits grows the table by 16KB which seems a good chunk and prevents over-large growth.