Skip to content

Enable parallel state root computation by default#4247

Merged
bhartnett merged 2 commits into
masterfrom
enable-parallel-state-root
May 19, 2026
Merged

Enable parallel state root computation by default#4247
bhartnett merged 2 commits into
masterfrom
enable-parallel-state-root

Conversation

@bhartnett
Copy link
Copy Markdown
Contributor

@bhartnett bhartnett commented May 15, 2026

I've been testing the parallel state root computation for a while now and it has been running well so far. Perhaps now is a good time to enable it by default.

It can cause an increase in memory usage in some scenarios and in the worst case goes from around 16G when the caches are full to around 24G.

The speed up is somewhere between 2-4x when using 16 cores/threads. For the large stateroot computation on startup the speed up is around 2x because writing to the database is the bottleneck in that case but when most keys are in memory we can get 3-4x speedup.

Comment thread execution_chain/conf.nim
parallelStateRootComputation* {.
hidden
defaultValue: false
defaultValue: true
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@advaita-saha How has your node been going with this enabled so far? Do you think we should make this enabled by default?

@bhartnett bhartnett merged commit 3282e07 into master May 19, 2026
29 of 32 checks passed
@bhartnett bhartnett deleted the enable-parallel-state-root branch May 19, 2026 14:17
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.

1 participant