SLOG and SSDs: are "super" capacitors really needed?
freebsd at edvax.de
Fri May 22 09:32:11 UTC 2015
On Thu, 21 May 2015 11:31:52 -0500 (CDT), Valeri Galtsev wrote:
> To re-phrase that (I'm just stealing somebody's else phrase...): all
> devices (that have RAM cache) lie about "transaction complete". They
> report it NOT when the transaction is safely dumped from volatile cache
> into non-volatile storage, but just as soon as the device accepted all
> data (most of which may be in volatile memory). This makes their specs
> look good compared to competition. And which technically is bad. As I for
> one would prefer "transaction complete" (or similar) only when all data
> are already safely stored in non-volatile part of the storage device. But
> the life is bad - there is no way of knowing it (as far as I know) ;-(
This is correct. There are many layers involved which all
will comsume some time to "do something" and then report
back about the result, like starting from fflush() to
the VFS layer, then through the "ada" disk driver, the
interface controller, to the drive's internal firmware.
(In fact, there are many more layers than those few!)
Just because the firmware then says "Done writing!" it
doesn't make you 100% certain that the data has actually
arrived in the non-volatile memory of the disk (or SSD, for
that matter), as this also takes time and may happen _after_
the firmware has reported success. Giving the drive "some
time" is always a good idea.
> PS Make use of UPSes!
This will give you the required time in worst case,
hopefully. Still a minimal chance for getting corrupted
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions