On Sat, Oct 18, 2014 at 04:48:22PM +1300, Lloyd Parkes via smartos-discuss wrote:
> I would expect that the kernel is either using cache flushing or the Force > Unit Access bit to ensure that it knows when all ZIL writes have actually > made it to stable storage. This in turn means that no upper layer will ever Oh, country mouse. > be told that data has been written when it hasn't, regardless of power loss > protection. On the other hand, my motto is "Expectation is the mother of > disappointment". What "power loss protection" usually means is that the device properly handles cache-related commands, in particular that SYNCHRONIZE CACHE or the ATA equivalent does not return GOOD status until all previous writes (including internal metadata) are persisted. There are several ways to do that; the best devices simply persist their entire internal DRAM buffer by providing power storage sufficient to write it out to flash in the event external power is lost. That's the method that provides both good performance and correct reliability. The other main method is to immediately flush the internal DRAM buffers to flash, which usually takes a long time. Most consumer-grade devices don't bother with that, because they don't want the Tom's Hardware review of their super number one megaspeed hypeinator 5000 SSD to show that you have to choose between correctness and performance (assuming the reviewer is even smart enough not to just publish lousy benchmark numbers). Instead they just ignore cache-flushing related functions and lose or corrupt data if power is lost while the buffer is not empty. Some devices I've personally worked with will also corrupt internal metadata, which may render the device completely broken until returned to the factory. If you're not sure what your device does, get a detailed datasheet or manual. If there isn't one available, that's probably a sign that the device is unfit for purpose. You can also run some tests of your own, although without knowledge of the internals of the device it can be difficult to interpret them. My personal take on this is that if you want cheap and fast and are willing to sacrifice correctness, just set sync=disabled and don't bother with a slog. It's basically the same and saves you a couple hundred bucks (bonus: it's almost certainly faster, too). If you care about your data, spend the modest extra money to get something that works. > What I also expect is that power loss protection will allow the SSD to lie > about when data has made it to stable storage, which should increase your > IOPS when trying to write through the cache. Sort of. As I noted, DRAM *is* persistent on a device with internal power storage. So it's not a lie. The question is what "power loss protection" means. Some vendors might be using it to mean that the device honours SYNCHRONIZE CACHE and related bits properly (that may be fast, or it may be slow). Others might use it only to mean that internal metadata won't be corrupted if power is lost. You really need to understand the details if you're going to make decisions about important data. > I thought the 840 EVOs had some firmware issues. There is a firmware update Every device with firmware has firmware bugs. You really, again, have to be specific about what the bugs are and what the effects are. It's very difficult to get that kind of information about enterprise devices, and in most cases impossible for consumer-targeted devices. ------------------------------------------- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
