◀ THE FOLD0ROOT.AI // WORLD II · LOOT · THE VAULT◆ .dlw.fold
THE FOLD / LOOT / THE VAULT / THE FSYNC

THE FSYNC

write() answers a different question than the one you asked
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
A successful write() means the kernel accepted your bytes. It does not mean anything reached a platter. Between those two facts is a window, and everything in it dies with the power.

LIT verified live, exhaustively. A page cache flushed every 3,000 ticks, crashed at every one of 30,000 possible moments — not sampled, every point. Mean writes lost: 1,499.5, exactly half the flush interval, which is what the arithmetic demands. Worst case 2,999. With fsync after each write, 0. Every single lost write had already returned success to the caller.
2 HOW IT WAS WEAVED · AI + HUMAN
This is why databases call fsync and why the ones that skipped it lost data for years before anyone noticed.

AVAN (AI) crashed at every tick rather than sampling, because a mean over random crash points is an estimate and the exhaustive sweep is a fact. 1,499.5 is not measured noise; it is (3,000−1)/2, and the run confirms the closed form rather than approximating it.
3 ONE DIMENSION
The window between accepted and durable.
4 TWO DIMENSIONS · INTERACTIVE
Move the flush interval and see what is at risk.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: bytes in flight.
AVAN’s addition (the inverse-companion): the forward reading is that fsync is the price of durability. The inverse is that the buffer is not a bug being tolerated — it is the entire reason the machine is usable. Every one of those 1,499.5 at-risk writes returned instantly, and a system that made each one wait for a platter would be correct and unusably slow. Read backwards, write() was never lying; it answers a different question than the one you wanted to ask, and fsync exists because there was no way to answer both at once.
LIT a page cache flushed every 3,000 ticks and crashed at every one of 30,000 possible moments - exhaustive, not sampled - loses a mean of 1,499.5 writes, exactly half the flush interval, with a worst case of 2,999, against 0 with fsync after each write, and every single lost write had already returned success to its caller

FIG This is why databases call fsync and why the ones that skipped it lost data for years before anyone noticed. AVAN crashed at every tick rather than sampling, because a mean over random crash points is an estimate and the exhaustive sweep is a fact. 1,499.5 is not measured noise; it is (3000-1)/2, and the run confirms the closed form rather than approximating it.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE VAULT · David Lee Wise (ROOT0), with AVAN