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: Scan files with mmap and bins #2504

Merged

Conversation

brooksprumo
Copy link

Problem

The accounts hash cache tool can be faster by scanning mmap'd files, and then optionally binning the results by pubkey. These binned results will be used when constructing the full state to diff in the next PR.

Summary of Changes

Scanning entries uses mmap'd files into bins.

@brooksprumo brooksprumo self-assigned this Aug 8, 2024
@brooksprumo brooksprumo marked this pull request as ready for review August 8, 2024 17:11
@@ -11,12 +11,12 @@ impl PubkeyBinCalculator24 {
std::mem::size_of::<T>() * 8
}

pub(crate) fn log_2(x: u32) -> u32 {
pub fn log_2(x: u32) -> u32 {

Choose a reason for hiding this comment

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

doesn't probably matter, but is this necessary?

Copy link
Author

Choose a reason for hiding this comment

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

No, not necessary. Let me revert that.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed in f0a2790.

jeffwashington
jeffwashington previously approved these changes Aug 8, 2024
Copy link

@jeffwashington jeffwashington left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

@jeffwashington jeffwashington left a comment

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 fd3ee54 into anza-xyz:master Aug 8, 2024
41 checks passed
@brooksprumo brooksprumo deleted the hash-cache-tool/scan-mmap-binned branch August 8, 2024 20:09
Copy link

@HaoranYi HaoranYi left a comment

Choose a reason for hiding this comment

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

lgtm.

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.

3 participants