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

generate_index passes batches of items #17290

Merged
merged 1 commit into from
May 20, 2021

Conversation

jeffwashington
Copy link
Contributor

@jeffwashington jeffwashington commented May 17, 2021

Problem

Validator startup time is commonly experienced. Generating the index is a large part of that time.

Summary of Changes

Pass account info in a batch. Then, calculate all initial map values prior to acquiring write lock.

Fixes #

@jeffwashington jeffwashington force-pushed the speedup_index4 branch 4 times, most recently from e8c211b to 1c61cd6 Compare May 18, 2021 13:47
@jeffwashington
Copy link
Contributor Author

jeffwashington commented May 18, 2021

look at total_us

generate_index total_us=25649788i scan_stores_us=23310437i (this pr)
generate_index total_us=39113701i scan_stores_us=22296476i (#17247)
generate_index total_us=42341212i scan_stores_us=22534402i (master)

#17247

lemond colo machine, snapshot-77779424-AP7QKgrw31e5tBhtPqxejbJbYU8rs6LA97L1Qq7gqpdX.tar.zst

@jeffwashington jeffwashington changed the title Speedup index4 generate_index passes batches of items May 18, 2021
@codecov
Copy link

codecov bot commented May 18, 2021

Codecov Report

Merging #17290 (4e2297b) into master (32ec834) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##           master   #17290   +/-   ##
=======================================
  Coverage    82.6%    82.7%           
=======================================
  Files         423      423           
  Lines      118111   118119    +8     
=======================================
+ Hits        97663    97685   +22     
+ Misses      20448    20434   -14     

@jeffwashington jeffwashington force-pushed the speedup_index4 branch 3 times, most recently from b39d1f0 to b6ff951 Compare May 19, 2021 22:37
@jeffwashington jeffwashington marked this pull request as ready for review May 19, 2021 22:37
@jeffwashington jeffwashington force-pushed the speedup_index4 branch 2 times, most recently from ffedefe to 5982d52 Compare May 19, 2021 22:47
@jeffwashington jeffwashington requested a review from sakridge May 19, 2021 22:48
&mut w_account_maps,
new_item,
);
if account_info.is_zero_lamport() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I left this where it was in this pr. It doesn't appear to make a big difference in metrics.

@jeffwashington jeffwashington merged commit 33ab9c4 into solana-labs:master May 20, 2021
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