[kwlug-disc] Flush to persist on Apple's NVMe drives

Doug Moen doug at moens.org
Sat Feb 19 11:37:28 EST 2022


One clarification missing from that thread is that MacOS fsync() has worked this way since 2004, and all of the databases with MacOS ports already know to use F_FULLSYNC instead of fsync().

So the new information is just how incredibly slow F_FULLSYNC is on the M1. It's as if some intern implemented F_FULLSYNC using simple brute force, and no engineering resources were allocated to testing how fast it is, since apparently Apple doesn't use this operation in their own code.

A related issue, there's an unanswered question about whether Apple's file system maintains file system integrity if there is an unexpected power loss. This isn't an issue on laptops due to the battery. But it may affect the mac mini, imac and mac pro. Somebody claimed that the API for file system write barriers (ensuring that blocks are written out in the correct order) is just as slow as F_FULLSYNC. So it's not clear to me if Apple is using write barriers for file system integrity.

On Fri, Feb 18, 2022, at 11:17 PM, Mikalai Birukou via kwlug-disc wrote:
> Performance versus need to persist data in observations of Apple's NVMe 
> drives: https://twitter.com/marcan42/status/1494213855387734019
>
>
>
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> https://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org




More information about the kwlug-disc mailing list