Skip to content

gc improve v3#3847

Merged
jolestar merged 4 commits into
mainfrom
gc_improve_v3
Dec 7, 2025
Merged

gc improve v3#3847
jolestar merged 4 commits into
mainfrom
gc_improve_v3

Conversation

@jolestar

@jolestar jolestar commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

Summary

Summary about this PR

  • Closes #issue

Copilot AI review requested due to automatic review settings December 5, 2025 14:46
@jolestar jolestar requested a review from baichuan3 as a code owner December 5, 2025 14:46
@vercel

vercel Bot commented Dec 5, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
rooch-portal-v2.1 Ready Ready Preview Comment Dec 5, 2025 3:16pm
test-portal Ready Ready Preview Comment Dec 5, 2025 3:16pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
rooch Ignored Ignored Preview Dec 5, 2025 3:16pm

@github-actions

github-actions Bot commented Dec 5, 2025

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Comment thread crates/rooch-pruner/src/reachability.rs Outdated
Comment thread crates/rooch-pruner/src/garbage_collector.rs
@github-actions

github-actions Bot commented Dec 5, 2025

Copy link
Copy Markdown

Docker images for this PR are available:

  • ghcr.io/rooch-network/rooch:pr-3847
  • ghcr.io/rooch-network/rooch:pr-3847-d4c4d01
  • ghcr.io/rooch-network/rooch:pr-3847_debug
  • ghcr.io/rooch-network/rooch:pr-3847-d4c4d01_debug

Pull commands:

  • docker pull ghcr.io/rooch-network/rooch:pr-3847
  • docker pull ghcr.io/rooch-network/rooch:pr-3847-d4c4d01
  • docker pull ghcr.io/rooch-network/rooch:pr-3847_debug
  • docker pull ghcr.io/rooch-network/rooch:pr-3847-d4c4d01_debug

@jolestar jolestar merged commit f744618 into main Dec 7, 2025
17 checks passed
@jolestar jolestar deleted the gc_improve_v3 branch December 7, 2025 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants