Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You're wrong. Please read the NVMe spec, section 7.1:

> the Flush command shall commit data and metadata associated with the specified namespace(s) to non-volatile media

It has nothing to do with DRAM. The spec is explicit about what Flush does. The drive is not allowed to ack the flush until the data and drive metadata are on durable storage.

For a discussion on what happens when the drive has power loss protection, see 5.24.2.1 - in that case the write cache (aka DRAM) is considered non-volatile and Flush can be a no-op. None of the drives I tested fell into that category however.



I agree with all that. Thanks for your knowledge. I am not a storage or driver engineer so I apologize for imprecise comments. Let's take a peak at section 5.2x.x (depends on spec version)

"Note: If the controller is able to guarantee that data present in a write cache is written to non-volatile media on loss of power, then that write cache is considered non-volatile and this feature does not apply to that write cache"

You would likely be more in a position to raise the issue with OEMs but I believe they will claim they have power loss protection with heavy asterisks attached and that is why they ack your fcntl FLUSH while not actually flushing out of the [actually volatile] DRAM.

I don't know why a guarantee is not actually a guarantee and why there may actually be gradations of PLP. Sounds fishy but that is one possible explanation for what you are seeing. Do you know? Anyway if you want the real PLP guarantee you have to get a drive where the documentation specifies backup capacitors and preferably oscilloscope traces. Ultrastar drives have such info, for example.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: