Hacker News new | past | comments | ask | show | jobs | submit login
How Long Does a Flash Drive Last? (bress.net)
95 points by devmonk on Oct 25, 2010 | hide | past | favorite | 18 comments



Nice article, though I'm not sure I quite agree with this (or perhaps the way it's phrased):

> 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".


I think it's talking about constant-use as "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.


I've left mine in my jeans, and put said jeans in the wash. Twice. It still works. Not that I'd recommend it.


This is very interesting. However, the OP's idea of "failure" is when something goes wrong with the system -- in this case, ext3 detected an error when trying to write to its journal. It's possible that silent data corruption occurred much earlier. If the OP reads this, I'd love to see the experiment repeated, with the added step of verifying the written data every time it's written.

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?).


It's possible that silent data corruption occurred much earlier.

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.

http://nvsl.ucsd.edu/ftest/


Flash drives use ECC precisely so that they can detect when memory cells are nearing the end of their useful writable lifetime before the data is unreadable.


I'm less concerned about the usable I/O life than I am with the ability (or lack there of) to recover if and when flash memory fails -- data recovery is very grim on flash memory in my experience.

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).


A single MLC doesn't last 90M writes. These drives have pretty big hidden spare capacity (up to 25% of the declared capacity). When a write fails the controller marks that cell bad and uses a spare cell instead. So it took 90M writes to kill all spare cells.


Until I lose it, typically.


Yeah, the thing with Flash drives these days is they get bigger and cheaper so quickly that I'm going to buy a new one a long time before it expired, even if I didn't lose it.


I have a LaCie IamaKey [1] tid to my keychain. It's a robust key-shaped thumb drive in metal. Looks good, works fine. A bit expensive, though.

1. http://www.lacie.com/us/products/product.htm?pid=11225


Here's a brief white-paper from Sandisk on how to calculate expected life times of a flash drive based on typical usage with wear leveling:

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.

http://www.oempcworld.com/support/SLC_vs_MLC.htm


The flash controller was levelling those 90 million writes across large numbers of cells.


One factor that's not accounted for here would be time. That is, how much degradation happens over time naturally. Given how microscopic these electronics are, minor perturbations are actually pretty major and might cause failures without any electrical activity happening on them. It would be interesting to see how this test goes over the course of several months or years.


Cool experiment. I didn't expect that result either - anyone know if ext3 is doing some shuffling behind the scenes, or is this entirely due to wear leveling?

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 recently bought a new Macbook Pro and I was tempted to get the SSD but I was skeptical on how well it would last in a heavy development work mode (lots of building large packages, large builds of customer's systems, etc.) If I just did Ruby and Ruby on Rails development (many fewer disk writes because of using an interpreted language) then I would not worry about it.

I guess that an extended warranty would take care of this concern.


It would be interesting to see this tried with a consumer SSD. Intel claims their X25-M will last 5 years if you write 100GB per day. That's 170TB. Write speeds for the G2 X25-M are around 100MB/sec, so it should take three weeks of constant writing.

If SSDs weren't so expensive I'd be tempted to test this.


> I can still mount and read from the drive, but I can no longer write to it. It's nice to know that when a drive dies, it's more likely you just won't be able to write new data to it, rather than complete data loss.

That's incredibly interesting & very nice to know! Makes SSD's look just that much sweeter.




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

Search: