Skip to content
New issue

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

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

Already on GitHub? # to your account

perf: Add resetBatch optimization to fastnode genesis #730

Merged
merged 3 commits into from
Apr 13, 2023

Conversation

ValarDragon
Copy link
Contributor

Add reset batch optimization to writing fast nodes at genesis, mirroring whats done for normal node saving.

This is really the same idea as #652 , but at the genesis-only level right now, as thats whats already done for normal nodes, and deemed normal at genesis. (Whereas #652 may have to reason about different guarantees, e.g. signalling when the full batch is completed)

This brings a significant speedup for InitGenesis logic.

Before (370 s + GC):
image

After (41.3 s):
image

This is also with massive GC reductions (due to far less leveldb.grow operations), and lower peak RAM usage. (One less full-module write copy)

@ValarDragon ValarDragon requested a review from a team as a code owner April 9, 2023 21:09
@ValarDragon
Copy link
Contributor Author

Marked this and #729 as backport v0.20.x, if thats alright. Would like to get Osmosis updated to have these, to reduce our InitGenesis overheads

@tac0turtle tac0turtle enabled auto-merge (squash) April 13, 2023 09:27
@tac0turtle tac0turtle merged commit b186ae7 into cosmos:master Apr 13, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants