48 points · by sciurus · 15y ago · 34 comments
Motive: Even absent deduplication, how do I know my three metadata writes didn't end up in the same ECC block and aren't going to fail simultaneously?
Open questions:
• In the real world, how common is a SSD unrecoverable read error?
• Are they confined to a single sector? Or a larger grouping?
The wikipedia article on TRIM claims that SSDs write in 4k pages. It's reasonable to assume that if I write 4 copies of a 1k block of metadata the SSD block remapping could drop them all into the same page. Is the ECC computed on sectors or pages? Will a failure take out all 4 copies? My Intel SSD 310 specification is mute on the matter.
Intel specifies a mean time between failure of 137 years for the drive and a "useful life" of 5 years. From that, I think we can assume Intel's reliability numbers are fiction meant to serve some other purpose than to inform, but since they are all we have we'll give it a go…
Intel says I can look forward to one unrecoverable read error at 1 sector/10^16 bits read. Which, if I read at maximum speed is 14 months. (But does reading fast really make it fail sooner? It they come from botched writes or degradation over time then specifying it in "bits read" is silly.)
Conclusion:
• There might be a danger.
• The spec sheets do not illuminate.
• Someone on HN may have had an SSD develop an unrecoverable read error and know what happens.
Remember, almost all products have some sort of bathtub curve[1], and the MTBF is the inverse of the observed failure rate at the bottom of the curve, while the useful life (or whatever the manufacturer calls it) takes the shape of the curve into account. Many products, including magnetic hard drives, have similar discrepancies between their MTBF and their useful lifespans.
I suppose if there are few units that will make it into the thousands of years they can balance it out. Perhaps they take 10% of the production, pack them in inert gas shielded inside a meter of lead and bury them deep in salt mines to keep the MTBF up.
I think that SSDs are great, but aren't yet as reliable as spinning rust, the standard deviation being really high.
For now I heavily "burn" SSDs before putting them in production, and use them in RAID only.
However of all the pains SSDs give me, I never had an unrecoverable read error so far, even on 3 years old 16GB M-TRON SSDs.
In this case, they assume that blocks written to very different sector numbers fail independently. FFS writes its superblock every million sectors or so across the whole disk, assuming they will end up on different radial positions or platters so that a head crash won't get both. That hasn't been a valid assumption in a long time.
• a random salt is not required in the metadata, a sequential serial number would do, and is easier (you only need know that last, not all previous numbers).
• with the right checksum algorithm you can remove the previous serial and update to the next serial with only minor computation on the checksum.
• you do not need to copy the metadata in ram if you can tolerate doing the writes sequentially. (This is will be a speed loss since the drive can't get all of them at once and schedule them optimally. It might be a big loss if the drive is also receiving a lot of other write requests at the same time.)
There was a conference where a Western Digital (drive maker) demonstrated Linux running on the procesor on the drive controller of one of their drives. NetApp (and Google) used to bemoan the fact that there was 2 million lines of source code between the SATA connector and the spinning rust that held the data written by people who worked for a hardware company. You really don't know what is going on behind your back in your disk 'drive'.
From a historical perspective the old DSSI drives that DEC used to sell had a mode where you could 'log in' to the disk and get a shell prompt, then run various drive diagnostic commands right from the drive. That was why they called them "Intelligent Storage Elements" instead of disk drives.
To Dave's point (author of the article), the only reliable flash based archive device would be one which uses a data integrity algorithm across multiple devices apparently. Probably a product idea in there somewhere.
In the mean time, consumer SSDs are optimized for booting Windows again and again. That's all. (apt-get upgrade is also pretty fast.)
(Naturally, pedantic commenters will automatically assume the POV which makes you out to be clueless.)
Is there an augmented terminology for dealing with this?
If there was a way for the OS to a) disable dedup when integrity is desired and b) exploit the space saved by using dedup, then it would be a good idea.
[edit: and i believe sandforce also compresses data, so it seems likely that it's some chunk of data, compressed, that must match some other chunk]
Another wonderful example of this is memory overcommitting and the OOM-killer on Linux, or the entire drama of disk caches vs power failures in just about every modern desktop and server OS, or how compiler optimizations interact with both undefined behavior and each other (especially when writing multithreaded code). My point is that this is neither new nor all that surprising.
The general solution is to provide a switch to turn off the worst of the lying. I wonder how long it will take to standardize such a switch for this behavior.
rut-roh.
One great example is a document sent as an email attachement to employees. that crap takes up tons of spool space.
Just one win like that more than makes up for triple storage of metadata.
No - what they're talking about is that the controller LIES to ZFS about what blocks are being stored. That throws a huge wrench in ZFS' COW and safety features. If ZFS writes two extra copies of a block, and the SSD deduplicates those two extra without bothering to tell ZFS, then you've got a serious problem.
Imagine if the SSD deduplicated all the ditto blocks?
(Ditto Blocks) http://blogs.oracle.com/bill/entry/ditto_blocks_the_amazing_...
Abstraction means that things lie to you. It also means that spinning disks can last longer than a month.
ZFS assumes that different block addresses with the same data point to different pieces of backing storage and therefore have certain behavior in case of errors, but does the spec actually state that this is a valid assumption? Or is this just a case of ZFS relying on particular behavior from things that are implementation-defined or undefined?
Storage systems are unaware of the context of the data they store -- it's just a stream of bits in blocks. The email attachment may not be written in a way that allows a dedupe app to detect the duplication.
Microsoft "solved" this particular problem (email attachment bloat) back in Exchange 2003, by using Single-Instance Storage for mail objects.
But in Exchange 2010, they abandoned this technology completely! Why? They reduced overall I/O load enough to allow the application to work on slow SATA drives, and engineered the application to be able to scale out dramatically.
So while single-instance storage is more technically elegant, some an operations standpoint, there are more cost savings opportunities in replacing a $900 600GB 15k SAS/FC disk with a $400 2TB 5.4k SATA disk.