Refs #6148 Separates disk usage into two cases: Allocated and used. Since we use both reserve and recycled segments, both which are not actually filled with anything at the point of waiting. Also refuses to recycle segments or increase reserve size if our current disk footprint exceeds threshold. And finally uses some initial heuristics to determine when we should suggest flushing, based on disk limit, segment size, and current usage. Right now, when we only have a half segment left before hitting used == max. Some initial tests show an improved adherence to limit though it will still be exceeded, because we do _not_ force waiting for segments to become cleared or similar if we need to add data, thus slow flushing can still make usage create extra segments. We will however attempt to shrink disk usage when load is lighter. Somewhat unclear how much this impacts performance with tight limits, and how much this matters. v2: * Add some comments/explanations v3: * Made disk footprint subtract happen post delete (non-optimistic)
88 KiB
88 KiB