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

Optimize performance of WorldStateUpdater commit method #4635

Merged

Conversation

ahamlat
Copy link
Contributor

@ahamlat ahamlat commented Nov 9, 2022

Signed-off-by: Ameziane H ameziane.hamlat@consensys.net
Co-authored-by: Karim TAAM karim.t2am@gmail.com

PR description

WorldStateUpdater commit method is one of the most consuming methods during block processing (engine_newPayloadV1 call). This PR will focus on parallelizing some parts of this method to make it faster.

image

The first results after 2 hours of execution

image

The results after 12 hours
image

We can see with CPU profiling that the commit methods takes less time and most of the execution is done in parallel in ForkjoinPool.commonPool().

image

image

Fixed Issue(s)

Mitigate #4549

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if
    updates are required.

Changelog

@ahamlat ahamlat changed the title Optimize performance of WorldStateUpdater commit method [Do not install this PR while it is in draft] Optimize performance of WorldStateUpdater commit method Nov 9, 2022
@ahamlat ahamlat changed the title [Do not install this PR while it is in draft] Optimize performance of WorldStateUpdater commit method [Do not install this PR while it is draft] Optimize performance of WorldStateUpdater commit method Nov 9, 2022
…allel

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
@ahamlat ahamlat force-pushed the optimize-worldstateupdater-commit-method branch from 2d9032c to c40778a Compare November 9, 2022 14:59
@matkt matkt marked this pull request as ready for review November 9, 2022 15:40
@matkt matkt enabled auto-merge (squash) November 9, 2022 15:41
@ahamlat ahamlat changed the title [Do not install this PR while it is draft] Optimize performance of WorldStateUpdater commit method Optimize performance of WorldStateUpdater commit method Nov 9, 2022
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
@matkt matkt disabled auto-merge November 9, 2022 16:29
@matkt matkt enabled auto-merge (squash) November 9, 2022 16:30
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@garyschulte garyschulte left a comment

Choose a reason for hiding this comment

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

LGTM, rebase, feedback and 🚢

ahamlat and others added 3 commits November 10, 2022 09:17
Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
…e loops, that may cause database corruption

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
@matkt matkt merged commit fcf640a into hyperledger:main Nov 10, 2022
wcgcyx pushed a commit to wcgcyx/besu that referenced this pull request Nov 16, 2022
…4635)

WorldStateUpdater commit method is one of the most consuming methods during block processing (engine_newPayloadV1 call). This PR will focus on parallelizing some parts of this method to make it faster.

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: wcgcyx <wcgcyx@gmail.com>
macfarla pushed a commit to jflo/besu that referenced this pull request Jan 10, 2023
…4635)

WorldStateUpdater commit method is one of the most consuming methods during block processing (engine_newPayloadV1 call). This PR will focus on parallelizing some parts of this method to make it faster.

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
…4635)

WorldStateUpdater commit method is one of the most consuming methods during block processing (engine_newPayloadV1 call). This PR will focus on parallelizing some parts of this method to make it faster.


Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Signed-off-by: Karim TAAM <karim.t2am@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants