How Long Does a Flash Drive Last?
bress.net
bress.net
> While it obviously can't stand up to the sort of abuse you could give a hard drive...
I'd have said one of the main advantages of flash storage is that it can stand up to vastly more abuse than an HDD. Toss your thumb drive across the room. Do it a few hundred times for good measure. Pick it up and it's like new. Try that with a disk drive and...I guess it boils down to your definition of "abuse".
However, I'd have to contest that I've had several flash drives that have become damaged because of pressure being placed across the USB connection and either grounding something or simply snapping the chips. The one that failed because of grounding (i suspect as it was metal casing and the USB connector didn't become loose) was simply because I left it plugged in with the keys on the keyring it was attached to.
I've never heard of mild pressure causing a HDD to fail, but seen it several times with flash disks. However, that said you could throw one off a 20th story balcony and it would work fine after hitting the ground.
That is, you would dd a random bit pattern to disk. Then you would read it back and XOR it with the pristine pattern you know you wrote. If you see any difference, you've got a much scarier kind of failure than the fail-stop behavior exhibited in the post.
Also, does the OP know whether any write buffering is going on? That could explain why some writes took much longer than others -- when the write actually goes to disk, it would take much longer than when it gets cached in memory. Use the "sync" command between each write to make everything go right to disk (I think?).
That is possible, but since flash uses ECC the controller should notice corruption.
Also, does the OP know whether any write buffering is going on?
There shouldn't be, since he's already using O_DIRECT.
why some writes took much longer than others
That's probably caused by erasing and data copying, since one erase is required for every ~1MB of data written.
If y'all are really interested in this topic, there are some good academic papers.
We recently had a CF card die in the time between taking it out of the camera and trying to load it into the computer. It was the only copy of a section of photos, so we had to attempt data recovery with it. Nothing was recoverable -- the memory chips had become damaged and the tiny electrical charge responsible for the storage had totally dissipated. Needless to say, my co-shooter now absolutely knows how to configure the camera for dual card writing (she had not correctly turned it on at the event in question).
http://www.sandisk.com/Assets/File/OEM/WhitePapersAndBrochur...
Note that in general there is two types of NAND flash, SLC (single-level cell) and MLC (multi-level cell). MLC is cheaper and denser, but isn't as fast and doesn't last as long as SLC.
His cheap USB drive was most likely MLC so it's pretty amazing that it lasted for about 90 million write cycles.
I'd be interested in seeing how many random data fill-ups the disk supports, as that would probably be a more accurate measure of "lifetime" (assuming infinite reads). Who knows what could be happening when you're just re-writing a single chunk over and over, and it's unlikely all drives will exhibit the same behavior.
I guess that an extended warranty would take care of this concern.
If SSDs weren't so expensive I'd be tempted to test this.
That's incredibly interesting & very nice to know! Makes SSD's look just that much sweeter.