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

Set max amount of epochs for state cache to retain states #87

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

povi
Copy link
Collaborator

@povi povi commented Jan 14, 2025

Set max amount of epochs for state cache to retain states, in order to avoid high memory usage during long non-finalization periods.

This is related to #59

@sauliusgrigaitis
Copy link
Member

This makes deep reorgs complicated. I think it makes sense to benchmark higher amounts of epochs in memory and set a value that makes deeps reorgs easier.

@povi
Copy link
Collaborator Author

povi commented Jan 15, 2025

I've increased the max amount of states to retain in state cache to 64. In non-finality benchmark, this increased the memory usage from 3.6 GiB to 6.4 GiB, which is still reasonable amount of memory used. This should make deep-reorg events easier for client to handle.

@povi
Copy link
Collaborator Author

povi commented Jan 15, 2025

I'm also thinking about adding a CLI argument that overrides this max epochs amount if needed

…o avoid high memory usage during long non-finalization periods.
@SifraiTeam SifraiTeam force-pushed the feature/max-epochs-to-retain-states-in-cache branch from 24a937c to 23091c1 Compare January 15, 2025 13:44
@povi povi merged commit c2470af into develop Jan 16, 2025
4 checks passed
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.

3 participants