gc improve v3#3847
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR optimizes the garbage collector (GC) performance through improved I/O patterns and memory efficiency. The changes introduce custom RocksDB read options for batch operations and stream-based sweep processing to avoid out-of-memory issues on large datasets.
Key changes:
- Added chunked multi_get operations with tuned ReadOptions (fill_cache=false, 8MB readahead) to improve GC scan performance
- Refactored sweep phase to use streaming iteration instead of materializing all candidates in memory
- Removed intermediate helper methods (
get_candidate_nodes_for_deletion,filter_nodes_by_reachability) in favor of direct streaming approach
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| crates/rooch-pruner/src/reachability.rs | Added multi_get_with_readopts method with RocksDB optimization; implemented chunking in parallel batch processing to prevent stalls |
| crates/rooch-pruner/src/garbage_collector.rs | Refactored sweep phase to use streaming RocksDB iterator, eliminating memory-intensive candidate collection and filtering steps |
| crates/rooch-pruner/Cargo.toml | Added rocksdb dependency for direct RocksDB API access |
| Cargo.lock | Updated lock file to include rocksdb dependency in rooch-pruner |
|
Docker images for this PR are available:
Pull commands:
|
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.
Summary
Summary about this PR