Boost logo

Boost :

Subject: Re: [boost] NuDB: A fast key/value insert-only database for SSD drives in C++11
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2017-03-25 23:16:36

On 25/03/2017 20:01, Lee Clagett via Boost wrote:
> At this point I'm sure Niall will tell me that writing <512 bytes to
> the beginning of the file is also not an atomic operation. Which is
> exactly what SQLite documentation assumes. The power-loss recovery
> algorithm gets tougher with this assumption.

That is a really fascinating topic I could write a really long email
about, but one I won't bore the list with. See In short, if O_DIRECT is
off, assume no atomicity at all, if O_DIRECT is on, probably infinity on
all very recent POSIX systems, Windows varies between 64 bytes and 4096
bytes depending on DMA.

This refers *purely* to *user observed effects*, and has no relation to
what order stuff actually hits physical storage. Note that even if a
device claims 512 byte blocks, no SSD actually implements that in flash
and you are reliant on the SSD doing a reliable RCU under sudden power loss.


ned Productions Limited Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at