“1.0” and above means “compact every log file that has even a single byte to recover”. You don’t want that, this would likely rewrite all of your storage after each bloom filter.
It doesn’t even need a bloom filter. A single expiring TTL piece could trigger a rewrite.
TTL pieces are stored in separate log files. These pieces still can be deleted early by a bloom filter, but expiration would only rewrite/kill the log files containing a given expiration date.
Seems like I was wrong on TTL pieces. Thanks for explaining.
How much higher IO activity are we talking?
In this context, what does .25 mean? and what does .6 mean? Is this basically the percentage of the file that SHOULDNT be reclaimable? Meaning the default is unless the file is over 75% reclaimable it wont be touched?
By default, each satellite/store combination is processed roughly once a day for compaction, with some caveats/corner cases. Logs that have less than STORJ_HASHSTORE_COMPACTION_ALIVE_FRACTION of live data are always compacted. So, for example, if bloom filters have erased 75% of your data, and you had alive fraction set to 0.25, then roughly half of the log files will likely be compacted seven days later, and the rest of them likely shortly after the next bloom filter.
Other log files are chosen probabilistically depending on the number of internal compaction rounds (which depends on STORJ_HASHSTORE_COMPACTION_REWRITE_MULTIPLE and the number of pieces that specific store already holds), amount of live data and the scale parameter STORJ_HASHSTORE_COMPACTION_PROBABILITY_POWER. This relation is quite complex, and again, there’s a number of caveats, but the defaults are chosen to keep the number of these probabilistically-chosen log files rather small.
So any non-trivial value for STORJ_HASHSTORE_COMPACTION_ALIVE_FRACTION will dominate over these probabilistically-chosen files.
And, personally, I find this logic pretty complex as well. Honestly, the simplest way to get an intuition on it is to ask a frontier LLM to study the code
For example with claude.ai all it takes is a prompt like Clone https://github.com/storj/storj/, look at storagenode/hashstore and study how are log files chosen for compaction.
here is a video explanation: Hashstore Migration Guide