by ayende · 11mo ago · 0 comments
It is great as long as your actual workload fits, but misleading if a microbenchmark doesn't inform you of the knee in the curve where you exhaust the buffer and start observing the storage controller as it retires things from this buffer zone to the other long-term storage areas. There can also be far more variance in this state as it includes not just slower storage layers, but more bookkeeping or even garbage-collection functions.
In many situations, fsync flushes everything, including totally uncorrelated stuff that might be running on your system.
You must have a single flushed write to disk to be durable, but it doesn't need the second write.