Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hash-cache-tool: Adds cli arg to limit state to single bin #2557

Merged

Conversation

brooksprumo
Copy link

Problem

Using the hash cache tool to diff state on pop-net with billions of accounts, we'll run out of memory trying to hold all that state.

Summary of Changes

Add a cli arg, --bin-of-interest, to limit the state we hold to a single bin.

@brooksprumo brooksprumo self-assigned this Aug 12, 2024
@brooksprumo brooksprumo marked this pull request as ready for review August 12, 2024 15:11
@@ -143,6 +144,20 @@ fn main() {
Must be a power of two, greater than 0, \
and less-than-or-equal-to 16,777,216 (2^24)"
),
)
.arg(
Arg::with_name("bin_of_interest")

Choose a reason for hiding this comment

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

This works.
I wonder if we could relax the single-bin to a bin-range?
For 8192 bins, we would need to run the command and scan the cache 8192 times to check all bins.

Copy link
Author

Choose a reason for hiding this comment

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

Yep definitely. I was going incrementally first.

Choose a reason for hiding this comment

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

lgtm.

@brooksprumo brooksprumo merged commit 3aa43d2 into anza-xyz:master Aug 13, 2024
41 checks passed
@brooksprumo brooksprumo deleted the hash-cache-tool/bin-of-interest branch August 13, 2024 13:00
ray-kast pushed a commit to abklabs/agave that referenced this pull request Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants