[CELEBORN-2442] Optimize meta memory for very large partitions - #3825
Open
FMX wants to merge 2 commits into
Open
[CELEBORN-2442] Optimize meta memory for very large partitions#3825FMX wants to merge 2 commits into
FMX wants to merge 2 commits into
Conversation
yew1eb
reviewed
Aug 24, 2026
yew1eb
reviewed
Aug 24, 2026
yew1eb
reviewed
Aug 24, 2026
SteNicholas
reviewed
Aug 24, 2026
Contributor
Author
|
Thanks for the review. I'll update this PR soon. @yew1eb @SteNicholas |
yew1eb
approved these changes
Aug 31, 2026
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.
What changes were proposed in this pull request?
This PR reduces the memory footprint of
PartitionLocationmetadata while preserving the existing wire protocol and public getter behavior.The main changes are:
WorkerEndpointto share worker host and port information across partition locations.host:pushPortandhost:fetchPortstrings into the shared endpoint.StorageInfoandRoaringBitmapusing thread-safe initialization.getMapIdBitMap()non-null for compatibility, and add a non-materializing accessor for serialization, HTTP API, and read-side inspection.LifecycleManagerandSlotsAllocator.storageTypes.headselection behavior inLifecycleManager.WorkerPartitionLocationInfoto avoid parsing and boxing overhead on the Worker hot path.longvalues.WorkerEndpointinstances after same-version Java deserialization.No protobuf schema is changed by this PR.
Why are the changes needed?
A shuffle may contain millions of
PartitionLocationinstances. Previously, every instance independently retained:StorageInfo.RoaringBitmap.Most of this metadata is identical across locations or unused for the majority of their lifetime. The eager allocations therefore contribute significant heap usage and GC pressure on the Master, Worker, and client.
The JOL benchmark includes both the live location graph and the weak interner overhead:
The additional serialization and range-read fixes are needed to ensure that lazy bitmap allocation does not introduce data loss, incorrect peer metadata, or compatibility regressions.
Does this PR resolve a correctness bug?
It fixes peer bitmap serialization and ensures that missing bitmap metadata does not cause an NPE or silently exclude a partition location during range reads.
Does this PR introduce any user-facing change?
There are no configuration, wire-protocol, or intended behavioral changes for users.
How was this patch tested?
The following verification was completed:
common,client, andmastermodule regression suites:PartitionLocationSuiteJ:LifecycleManagerReserveSlotsSuiteintegration test:celeborn-common/Test/compileceleborn-service/Compile/compilespotless:checkandgit diff --check.PartitionLocationMemorySuiteJwith JOL for both the 10,000-pair and 1,000,000-pair scenarios.