[kwlug-disc] Flush to persist on Apple's NVMe drives
Mikalai Birukou
mb at 3nsoft.com
Tue Feb 22 09:28:39 EST 2022
I start to have a funny view on storage, as boundaries start to blur.
When I get SATA device, its cache memory is on that PCB inside, i.e.
flash, and caches are on that PCB. I hope that such device has
capacitors to flush "flushed" cache in case of power loss.
When RAM and flash chips are soldered to main board, should I treat it
as storage device with CPU? RAM can be used for flash's needs and for
programs. Then RAM is moved into CPU. Nice boundaries are gone.
Is my impression wrong?
> F_FULLSYNC on Mac hardware may be slow, but at least it flushes the cache and stores the data in nonvolatile storage.
>
> Not so much with some non-Apple NVMe SSDs. But I bet they benchmark well.
>
> https://twitter.com/xenadu02/status/1495693475584557056
>
>> The models that never lost data:
>> Samsung 970 Evo Plus: MZ-V7S2T0, 2021.10
>> WD Red: WDS100T1R0C-68BDK0, 04Sept2021
> On Sat, Feb 19, 2022, at 11:37 AM, Doug Moen wrote:
>> 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
>> _______________________________________________
>> kwlug-disc mailing list
>> kwlug-disc at kwlug.org
>> https://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> https://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
--
Mikalai Birukou
CEO | 3NSoft Inc.
More information about the kwlug-disc
mailing list