Quick growth of piece_expiration.db

the bulk of data coming in is test data from saltlake with TTL deletion times, which is what bulks up the piece_expiration DB.

I have a node with 8.9TB of data and the expiration db is 8.9GB. So they are often pretty large.

Maybe there is some more optimization that can be done like compressiing or vacuuming the db.

It is my understanding that sqlite databases don’t shrink automatically when data gets deleted unless auto vacuum is enabled:
https://www.sqlite.org/pragma.html#pragma_auto_vacuum

I don’t know if it is enabled on this database. If not, then it seems it has to be done manully to reduce the database size again.

1 Like

It’s likely enabled, but you can read how it works in the linked document. You need to run a VACUUM explicitly to gain most of the space. It’s like a defragmentation.
However, it will grow again, because a new TTL data will come and perhaps greater than before. And the DB will be expanded again.