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

disk index: set_anticipated_count to optimally grow disk buckets at startup #31033

Merged
merged 2 commits into from
Apr 4, 2023

Conversation

jeffwashington
Copy link
Contributor

@jeffwashington jeffwashington commented Apr 3, 2023

Problem

See #30711
At startup, we know how many inserts are soon coming.

This appears to cut ~15s off startup time and should greatly reduce disk i/o during startup.
This is a candidate for 1.14 if we want to enable disk index.

Summary of Changes

Tell the disk index code how many inserts are coming so that the resizing algorithm doesn't go through unnecessary incremental regrows.
This becomes very important when we stop doubling the index size each time we grow the index bucket.

Fixes #

@jeffwashington jeffwashington marked this pull request as ready for review April 3, 2023 19:50
@codecov
Copy link

codecov bot commented Apr 3, 2023

Codecov Report

Merging #31033 (f551092) into master (f289a07) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##           master   #31033   +/-   ##
=======================================
  Coverage    81.5%    81.5%           
=======================================
  Files         728      728           
  Lines      205553   205567   +14     
=======================================
+ Hits       167649   167661   +12     
- Misses      37904    37906    +2     

@jeffwashington jeffwashington merged commit bc343a4 into solana-labs:master Apr 4, 2023
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