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

don't try to ancient pack already large storages #548

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

jeffwashington
Copy link

@jeffwashington jeffwashington commented Apr 2, 2024

Problem

Account state continues to grow.
We'd like to turn off rent exempt rewrites.
At that point, we accumulate old append vecs.
We append or pack those into 'ancient' append vecs.
The packing algorithm can go off the rails in certain testing scenarios.
Note that the ancient algorithm is currently 'append'. This code does not affect 'append' at all.
The packing algorithm is the future. Packing is enabled with --accounts-db-create-ancient-storage-packed

Summary of Changes

Apply some limits to what the packing algorithm will attempt.
In this case, we skip trying to pack storages that are not shrink candidates but are already close to ideal size.

This limit is a stop gap to prevent machines from running oom by trying to combine too many and too large append vecs in one pass (by not flushing the write cache most likely or by loading pubkeys into memory for billions of accounts).

Fixes #

@jeffwashington jeffwashington force-pushed the 4a4 branch 4 times, most recently from 46c3034 to f0bb0fe Compare April 3, 2024 19:57
@jeffwashington jeffwashington marked this pull request as ready for review April 3, 2024 19:57
Copy link

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

lgtm

I think if you rebase on latest master it'll pull in a fix for the CI checks dependency issue.

@jeffwashington jeffwashington merged commit 527cad2 into anza-xyz:master Apr 4, 2024
38 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.

2 participants