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

Garbage collection may take a long time #10971

Closed
Tracked by #10981
bowenwang1996 opened this issue Apr 7, 2024 · 1 comment · Fixed by #11022
Closed
Tracked by #10981

Garbage collection may take a long time #10971

bowenwang1996 opened this issue Apr 7, 2024 · 1 comment · Fixed by #11022

Comments

@bowenwang1996
Copy link
Collaborator

A validator reported that their node usually miss blocks and/or chunks at the beginning of an epoch. At some point in the middle of the epoch after gc finishes, the number of missed blocks and chunks starts to go down. As can be see in grafana, GC can take more than 0.3s, which could make the difference between missing a block/chunk vs. producing them on time.

A long term solution is to move GC to a different thread, as attempted in #3090. However, that could require some nontrivial work and a short term mitigation could be that we don't run garbage collection when block processing already takes a relatively long time.

@bowenwang1996
Copy link
Collaborator Author

Screen Shot 2024-04-07 at 10 38 07 PM It is quite interesting that StoreUpdate::commit can take more than 1s

github-merge-queue bot pushed a commit that referenced this issue Apr 19, 2024
Move garbage collection into a separate actor to prevent it from
blocking synchronously inside client actor. Fixes #10971. For testing,
`garbage_collection_intense.py` sends a lot of insertion and deletion
transactions on the same key and make sure that nodes do not crash after
gc is done. The change is also run on a mainnet node and so far it works
fine.

TODO: run all nayduck tests
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 a pull request may close this issue.

1 participant