Repository navigation
Conversation
Replica partitions are only read when fetching from the primary fails, but StoragePolicy placed them in memory file storage just like primary partitions. Add celeborn.worker.memoryFileStorage.replica.enabled (default false) so replica partitions fall through to the next storage type and memory file storage is reserved for primary partitions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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?
Add a worker config
celeborn.worker.memoryFileStorage.replica.enabled(defaultfalse). When it is disabled,StoragePolicyskipsMEMORYfor partitions whosePartitionLocationmode isREPLICA, so replica files fall through to the next storage type inceleborn.worker.storage.storagePolicy.createFilePolicy(e.g. SSD/HDD/DFS). Primary partitions keep using memory file storage as before.Why are the changes needed?
When memory file storage is enabled (
celeborn.worker.directMemoryRatioForMemoryFileStorage> 0),StoragePolicy#createFileWriteralways triesMEMORYfirst and does not distinguish primary from replica partitions (Controller#createPartitionDataWriterreceivesisPrimarybut only uses it to look up an existing working partition). With replication enabled, roughly half of the memory file storage budget, which also counts toward the pause-push thresholds, is spent on replica data. Replica data is only read when fetching from the primary fails, and in that case reading from disk is acceptable. Keeping replicas out of memory leaves memory for data that reducers actually read and delays eviction and push pauses.Does this PR resolve a correctness bug?
Does this PR introduce any user-facing change?
Adds the new worker config
celeborn.worker.memoryFileStorage.replica.enabled(defaultfalse). With the default, replica partitions are no longer stored in memory file storage. Set it totrueto restore the previous behavior.How was this patch tested?
StoragePolicyReplicaSuite, which covers: primary goes to memory, replica skips memory by default, and replica goes to memory when the config is enabled.build/mvn test -pl worker -DwildcardSuites=org.apache.celeborn.service.deploy.worker.storage.storagePolicy -Dtest=none(JDK 17): passed, 8 tests.build/mvn test -pl common -DwildcardSuites=org.apache.celeborn.ConfigurationSuite -Dtest=none(JDK 17): passed, docs in sync.