Skip to content

Fluffy: Simplify and optimize ContentDb pruning #3163

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kdeme
Copy link
Contributor

@kdeme kdeme commented Mar 25, 2025

Simplify by shrinking the data radius with 5% and just deleting all content that no longer falls within that range.

This gives roughly a 150x speed improvement on a 4GB database. The downside is that we cannot be certain that a single 5% radius drop will result in a similar storage drop.

# dataRadius, so the radius will constantly decrease through the node its
# lifetime.
db.dataRadius = newRadius
while db.usedSize() >= int64(db.storageCapacity):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't fully like that we have to do a while loop here, but else there might be situations where nothing or not enough content gets deleted.

Simplify by shrinking the data radius with 5% and just deleting
all content that no longer falls within that range.

This gives roughly a 150x speed improvement on a 4GB database.
The downside is that we cannot be certain that a single 5% radius
drop will result in a similar storage drop.
@kdeme kdeme force-pushed the simplify-contentdb-pruning branch from af5fcfa to 68bd7bc Compare April 3, 2025 11:46
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.

1 participant