-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
chunk all ancient append vecs #33909
Conversation
Codecov Report
@@ Coverage Diff @@
## master #33909 +/- ##
=======================================
Coverage 81.9% 81.9%
=======================================
Files 811 811
Lines 219335 219356 +21
=======================================
+ Hits 179710 179758 +48
+ Misses 39625 39598 -27 |
5c5e535
to
d3dc2f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. And to confirm, the perf numbers are still the same as what's in the original/current PR description?
Co-authored-by: Brooks <brooks@prumo.org>
Co-authored-by: Brooks <brooks@prumo.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
accounts-db/src/accounts_hash.rs
Outdated
@@ -250,6 +253,21 @@ impl HashStats { | |||
("collect_snapshots_us", self.collect_snapshots_us, i64), | |||
("num_snapshot_storage", self.num_snapshot_storage, i64), | |||
("scan_chunks", self.scan_chunks, i64), | |||
( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe these stats already do what you are after?
solana/accounts-db/src/cache_hash_data_stats.rs
Lines 39 to 53 in 8c69a0e
( | |
"loaded_from_cache", | |
self.loaded_from_cache.load(Ordering::Relaxed), | |
i64 | |
), | |
( | |
"saved_to_cache", | |
self.saved_to_cache.load(Ordering::Relaxed), | |
i64 | |
), | |
( | |
"entries_loaded_from_cache", | |
self.entries_loaded_from_cache.load(Ordering::Relaxed), | |
i64 | |
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. These stats are what I want. I removed the redundant stats that I added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
lgtm. thanks, @HaoranYi |
Problem
When we pack ancient vecs, we end up with non-ancient append vecs interleaved with ancient append vecs.
This ends up causing hash calculation to take much longer. Hash Calculation is very sensitive to the # of chunks.
The current chunking algorithm assumes the model of appending ancient append vecs.
Summary of Changes
Just create ranges instead.
The blue line that drops here is restarting with the removal of the ancient splitter algorithm (this pr).
Here's the overall hash calc time with removing this code:
Fixes #