Skip to main content

MIN_FREE_BYTES

Constant MIN_FREE_BYTES 

Source
const MIN_FREE_BYTES: u64 = _; // 8_589_934_592u64
Expand description

Free space below which the margin above stops being a margin, in bytes.

MIN_FREE on its own is a ratio, and a ratio does not know how big the volume is. On a 1 TB disk shared with everything else on the machine, 10% is 100 GB: a developer sitting at 45 GB free is under the floor, so every block is deleted within a sweep of being written, and the only sign is a warning in a log nobody is reading. The disk was never in danger — 45 GB is more than Mira had ever asked for.

So both have to say “full” before anything is deleted, and this is the term that has to be true in bytes. It covers what can actually be lost: the blocks in flight are three signals’ target_block_bytes plus their staging copies, 192 MiB at the default, and retention sweeps on a 60s interval, so the floor also has to absorb whatever lands between two sweeps — a minute of a saturated gigabit link is about 7.5 GB. 8 GiB clears both with the margin the ratio was there to provide, and stays far under any volume where the ratio is the binding term.