Friday, May 23. 2008How Long Does a Flash Drive Last?Trackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
You really should be doing your test with EXT2, mounted with 'noatime', not EXT3. With EXT3, the filesystem writes to the journal every time you sync metadata to the file. With EXT3 and default options, it is going to update the metadata every time you write to update atime/mtime. This means that it updates several other blocks other than your file data.
The noatime is a good call, but I was well aware of the journal updates and having them there was intentional. My goal wasn't so much to get an exact number of writes, but just a general idea of how a typical filesystem I run would stand up.
I'm certain there are lots of things I could have done to make this test more exact. Perhaps I'll put this knowledge to use in a future run. Thanks.
Were you still able to read off of it even after the write died? Or was it all just burnt out?
I am using ext3 on Ubuntu with 8 GB A-data USB flash drive.
I use: noatime in /etc/fstab tmpfs on /tmp I tried to raise commit interval, but dont know if it works correctly. I disabled disk cache in Firefox but it still seems to me that firefox is doing most of the writes do the drive. My machine writes several hundreds of megabytes to the drive each day, while browsing Internet and doing normal stuff. You left very small space for wear leveling to kick in. If I leave approx 1GB of 8GB free at all times how long can the flash drive live? I would make an experiment if you gave your testing software to the public.
thanks a lot for this study. this is exactly the kind of information i was looking for. i reached your site through wikipedia
hello, can you please put here the script you used or at least some explications how to bypass caching using that flag??
i create a small script in fedora that generates the test-file continously on the usb key with a simple counter to show me how much the file has been written but i dont think it works beacose of the caching !
It's not a script, but rather a small C program I wrote. You can get them here:
http://www.bress.net/~bress/sync-file.c http://www.bress.net/~bress/sync-random.c Just build them with gcc, no extra libraries are needed. The sync-file.c will copy a file using the O_DIRECT flag. The sync-random.c will write random data to the output file. This is most useful as if the flash drive is smart, they will only flip the bits that change, so writing the same data over itself, wouldn't result in an actual write.
Hmmm... I wonder if you could extend this test and see how many bazillion times you can continue successfully reading from the un-writable drive before it starts coughing up read errors.
Is it possible to test this on a FAT/FAT32 FS? Just wondering, since I use Windows XP...
(Yes, laugh at me all you want...)
you couild try to low level format the USB flash disk. First search the internet for Chip Genius, it's a chinese program that will identify the microcontroller in the stick, then you can search for an MPT (Mass Production Tool) for that specific chip. With this tool you can low level format the stick... it will automatically detect bad blocks also.
Thanks! I have a Sacrificial 64MB flash drive I can use that I wanted to test.
Thank you for this information. I had wondered the same thing...and value the test/analysis, and results you shared!
Great Job!
Thanks, that's very interesting. I just washed and dried two of these, and they both worked after! Totally amazing. Or maybe I'm using the wrong kind of detergent...
Interesting study; I'm waist-deep in my own project with similar aims (however, I've got a number of cards/pendrives from various vendors, and would like to test this over a number of devices).
However, I don't know how useful it would be given the likelihood of failure from other causes (ESD, broken solder point, etc.)
I would like to add to the thank you notes regarding this study.
I am happy to see work like this is still available amongst all the trash on the net. I am glad to have found you through Wikipedia and will be visiting your blog again. Thanks John, Denny
What you're seeing in your "writes between wear-leveling" graph is the drive running out of reserve blocks. Fewer reserve blocks = less wear leveling.
This is exactly the information I was looking for. Thanks a lot for sharing your findings.
Regards, MV
This is an excellent article! I am amazed at how you did this! Keep up the good work!
Thanks for the interesting reading. I had always thought that these things didn't last forever. And your data and testing proves that. I have two 8 Gig flash drives from Micro Center that died at the same time. One turned out to be just mechanical falure due to the pins wearing out the other just quit. Most likely from the same thing or even from falure of a internal pin broken. Wich prompted me to search for just this kind of Blog. Keep up the Geek work.
Hi, I join those who thank you for this excellent piece of work. Just one question remains in mind. How long will data stored on a flash drive last? Does it deteriorate with time? For example if I store photos on such will they still be there in 10/20 years time, assuming technology still exists then to allow me to retrieve them. (A very real possibility, if you think of floppy disks - the only way you can get information of them now, is to find an old Computer that still has a Floppy drive)
Regards, Fred CB
Fred,
It's hard to say how long a flash drive will "last". It's going to be subject to the same electro/magnetic deterioration any other electronic or magnetic media is subject to: over time, the cells will lose their charge state, resulting in the discreet 1s and 0s being muddled. I've heard 10 years used as a liberal outside number for "this is when data will deteriorate". If you were to take the drive out of storage and rewrite it every year or two, I see no reason why it wouldn't last 10 years. But realistically, wouldn't you want to migrate it to a larger, newer device within a couple years anyway?
Not yet true, Fred. External floppy drives are readily available. I recently bought a Memorex USB single/double sided external floppy drive part# 3202 3239 (at, I believe, Office Depot.)
Thanks Ben, I had an idea it was roughly 10 years but was seeking confirmation, not being exactly sure how data is stored on a Flash Drive as compared to a floppy disk.
You are right about it being best to move the data to a newer device every few years, but I was more concerned about putting something aside on a Flash Drive and then unintentionally forgetting about it, then remembering at some later stage, especially photos. FredCB
Fred,
Just to be clear, data written once to flash storage will not likely last for 10 years. The memory states will likely decay, and at least some of the data will be unrecoverable. Barring other failures and considering repeated writing of the data over a period of years, I suspect it -might- last that long. Though, we've not had flash drives long enough to make a concrete determination. They're the modern floppy disks, albeit with significantly less volatility and greater density. I would personally consider them about as reliable as tape media, for all intents and purposes. IE, don't use them for single-source archival.
Hi Josh
I is a very interesting article and I am currently looking into something similar. I do however not understand why you would fill up the disc with random data before doing the test. I would presume that the wearleveling does not understand the filesystem, thereby not knowing which block are used and which aren't - have you do a test on a disc without filling it? How long did the test take? BR Jesper
That said, I can still remember when people were fascinated by CDroms and how long would they last etc. I heard some funny estimates like a CD should be re-written every 3 to 5 years because they'd fade etc. I know have some CD's going back to 1996. They still read just fine. My point is how long this lasts in storage is speculation. It could be 5 to 10 years. Or maybe someone will find a USB stick in 50 years and it will still have data on it. Who knows.....
This is great, thank you. I had recently read about the finite lifetime of flash drives and was starting to worry about using it for my school programming projects - I do all the compilation etc on the flash drive. This gives me more confidence in using it.
|
Calendar
QuicksearchCategoriesBlog Administration |
|||||||||||||||||||||||||||||||||||||||||||||||||