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

Replay slows down #20

Closed
skzap opened this issue Aug 12, 2019 · 6 comments
Closed

Replay slows down #20

skzap opened this issue Aug 12, 2019 · 6 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@skzap
Copy link
Member

skzap commented Aug 12, 2019

Doing a full replay from scratch starts off pretty fast but slows down over time because of poor memory management. Restarting the node periodically fixes the issue but it is dirty. Avalon needs to more properly manage memory during a replay.

@skzap skzap added the enhancement New feature or request label Aug 12, 2019
@skzap
Copy link
Member Author

skzap commented Aug 18, 2019

@skzap
Copy link
Member Author

skzap commented Aug 18, 2019

I've done some changes on this new branch and will run some tests now. Trying to replay with old code and new code and calculate performance increase

@skzap
Copy link
Member Author

skzap commented Aug 18, 2019

Wasn't that. Still similar speeds.

@skzap
Copy link
Member Author

skzap commented Aug 18, 2019

I think the slowdown issue is the cache.js file now. Skipping the cache backup/rollback system during transaction verification improves the replay speed by a lot and it doesn't seem to slow down. Alas this would break the state of the node on any wrong transaction or block received (let's say a forked node sent a bad block) ...

@skzap
Copy link
Member Author

skzap commented Aug 18, 2019

Ok I did some good progress, replay is much faster now, feel free to try the new memory-fix branch with git checkout memory-fix (just don't do it on your active node :D)

@skzap skzap added the bug Something isn't working label Aug 20, 2019
@skzap
Copy link
Member Author

skzap commented Aug 26, 2019

Ok I merged the branch into master. I believe replay speed can still be upgraded by 'clusterizing' the secp256k1 and maybe the sha256s in order to make full usage of multiple cpu cores.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant