Summary: While the technology continues to improve, the fact is that flash memory has a limited number of times it can be written to. I can, in fact, wear out.
|
I have a database application that I share between multiple computers. We keep the database itself on a USB thumb drive and simply move that drive to the other computers as needed. The database is never copied off the thumbdrive, we just update it in place. Seems very simple. A friend of mine just told me that I was asking for trouble. He said something about thumbdrives "wearing out", and that sooner or later, probably sooner, the data on my thumbdrive would become corrupt. Is that true? Do these USB drives actually wear out? |
Let me put it this way: I strongly recommend that you backup the contents of that drive - also sooner rather than later.
Flash memory, the type of memory used in USB thumb drives and other devices, is very, very cool. In fact I'm loading up a gigabyte SD-Ram card for my MP3 player as I type this. But there is a dark side that people don't talk about much.
Flash memory "wears out".
•
Flash memory chips are called "flash" because in order to write to it, the memory is loaded, and then a signal is sent to the memory circuitry that says "remember this" - kind of like the flash on a camera. (In all honesty, I don't know if modern flash memory uses this exact technique, but it remains a fairly accurate metaphor for the process.)
Once the memory has been "flashed", power can be completely removed and the memory will retain whatever was written to it.
The "problem" is that memory can be flashed only so many times. I'm finding numbers between 10,000 and 100,000 times - though as with anything, I'm sure that is increasing over time as well. Regardless, there is a limit. When that limit is approached, some portion of the memory may not properly remember what was written to it, resulting in corruption. It may only take a single bit of information to be wrong, or to "wear out", for the entire contents of a flash memory chip to be lost.
Scary, huh?
Some flash memory chips, perhaps even most, now also include circuitry to avoid "bad bits". Meaning that if portion of the flash memory finally wears out and goes bad, the chip itself can compensate and look like everything is fine. But that only lasts so long ... it doesn't prevent failure, it only postpones it.
Now, in your case, you're using USB thumbdrive in perhaps the worst possible way for longevity. Database applications in particular are notorious for writing to the disk - a lot - as tables, fields, indexes and the like are updated. Even if you don't write to your database, the files may be updated with things like "last access" information and other administrivia that still results in the USB drive being written to.
With all that writing going on, suddenly 10,000 or 100,000 writes to the same location in the flash memory doesn't seem that far fetched. Remember, in the unluckiest case, it might only take one worn-out bit of information to render the entire contents unreadable.
The best use of USB thumb drives and other flash memory based devices is simply copy-to and copy-from. By that I mean copy the information to the thumbdrive to store it, copy it from the thumbdrive to a local hard disk to use it, and then copy it back to the thumb drive to store it. Never run disk-intensive applications directly against files stored on the thumb drive. If you copy to and from even 10 times a day, that's still close to three years of usage for the low end of the flash memory lifespan. (Yes, I know that's not exact. In fact, it's way more complex than that, factoring in things like the type of file system, FAT or NTFS, the efficiency of the device driver, and even the circuitry on the specific flash memory device - but it's a good order of magnitude.)
You may also note that your application speeds up when you copy your database to the hard disk for use. While reading flash memory is typically quite fast, writing is not.
And finally, if you really need external storage, a thumbdrive may simply be the wrong solution to your problem. There are plenty of external hard drives that could do the same job without the write limitations. Or perhaps a networked solution is the way to go.
Related:
Ask Leo! - How can I tell if I have USB 2.0?
Ask Leo! - Can I use a USB RAM stick to increase system memory?
Imation - USB Flash Drives - You CAN Take It with You - includes the write limit information referenced above.
Article C2618 - April 12, 2006
J. P. Gilliver is not completely right, as he forgot the point that live database usage can do thousands of writes in one day.
Here is a more important question: Do flash drives manage bad blocks like modern disk drives? If not, they are getting large enough that they probably will start to support SMART testing.
17-Jan-2009
this is just shocking, now i know the reason why my flash drive get many serious problems, when i put the flash drive connected to the computer, i just open my drive and directly run my applications stored in the flash, since the application writes and updates the data in my flash, that's the problem, i had just ran out of write limit of the flash drive, you know, it has so many bad sectors today, i bought last year, yeah, you're right, why don't we just take out a large data storage for more safe and secure data to bring, ready to make a space for a hard drive in my bag, lol, thank you, this is open-minding for a amateur programmer like me
Posted by: Punk at February 21, 2009 7:09 AMIf these new SSD drives use flash memory, will they also become corrupted quickly from the constant writes?
I keep thinking about jumping to SSD as the prices drop and the sizes jump, and the biggest attraction to me is not the blazing speed (that is nice too), but the peace-of-mind from not having to worry about the old fashioned platter-spinning drives physically crashing.
However, after reading all these comments, it sounds like I'll be lucky if an SSD drive can last a year or two as the main drive on my computer before all the little bits start blowing like fuses.
Do these SSD drives use the same type of flash memory and what kind of life expectancy can I expect. (OZC's latest SSD drive says 1.5 million hours mean time before failure or MTBF, but now I am wondering what that spec measures - is that all time spent reading data and none spent writing).
If the little bits are all being flashed into oblivion will I even get a fraction of that 1.5 million hours? Should I hold off with SSD drives and embrace my good old platter-spinning drives for data integrity and longevity for a while longer?
22-Feb-2009
Extremely interesting subject. I heard someone say the Eee computer from Asus (and other me-too products) did not have a hard disk, only flash memory. I just browsed through the Asus website, but did not find a confirmation. True, not true?
12-Mar-2009
the flash can not be read from any computer. They do not recognize a new storage device (the red led on the flash is not on) . is the flash drive gone for good or can it be saved?
Posted by: Bart at March 30, 2009 6:32 AMI'd rather see some information from the manufacturers on this. Wear-leveling is supposed to be built into the memory controller, so it automatically takes care of wear, and only writes to parts that haven't been written to too many times. One would presume that it would also double-check everything it's written to make sure it can be read correctly, and mark it as a bad sector if it doesn't read back what it wrote.
Yeah, they wear out, but I'm skeptical that you would actually lose any data because of it. In a well-designed product, the available capacity on the drive would just decrease over time.
Posted by: Skeptical at April 7, 2009 7:20 AM"Diskeeper Corporation" has a reference in it's settings for Diskeeper 2009 that says it has technology to help flash units from becoming error prone and suggests that longevity can be attained by using their defragmenting technology.
If it "flashes" the drive as you say, defragmenting would reduce longevity, no?
I'm not questioning your guruness, O Mighty Leo, but this seems to be a contradiction. I don't know enough about it, just what I read.
My 2 cents CDN.
Posted by: Ken Amirault at April 14, 2009 11:42 AMWhat about thumb drives used in Vistas's "Ready Boost" facility or E-Boostr's program that alleges to do much the same thing in XP?
http://www.eboostr.com/
I tried E-Boostr in XP and I can't say as I noticed a great deal of difference in the perkiness factor, despite using high speed drives! How much reading/writing goes on using these facilities and what sort of life will the drives have? (Tedious, I would imagine!). I did read one report that MS expects a thumb drive using Ready Boost to outlast the PC's life, which seems a tad optimistic to me.
So, yeah, I actually agree with Microsoft's assessment - since it's not constantly being written to it may well outlive your computer when used for ReadyBoost.
I also have to agree with you. Every report I've heard back is that ReadyBoost doesn't really help that much.
15-Apr-2009
I use USB drives pretty regularly with some pen drive apps, especially T-bird and Firefox and a few recovery tools I use to fix peoples computers like Bart-PE, Ubuntu and file recovery stuff. I haven't had any problems but I keep a folder on my hard drive for each USB drive and back up regularly. No hardware is immune to failure. My only loss would be the $10 I invested in my stick.
Here's an old classic:
Yesterday-The Backup Song
Yesterday,
All those backups seemed a waste of pay.
Now my database has gone away.
Oh I believe in yesterday.
Suddenly,
There’s not half the files there used to be,
And there’s a milestone hanging over me
The system crashed so suddenly.
I pushed something wrong
What it was I could not say.
Now all my data’s gone
and I long for yesterday-ay-ay-ay.
Yesterday,
Posted by: Mark at April 16, 2009 5:51 AMThe need for back-ups seemed so far away.
I knew my data was all here to stay,
Now I believe in yesterday
I've only had my 8gb kingston thumb drive for a short while and havent used it for much, the occasional word document or so. But as if overnight, I don't know what happened, but now my thumb drive has been reduced to the capacity of 4mb! and also says that it needs to be formatted. I used some partition making program provided by kingston so i don;t know if that screwed up the thing or maybe its somehow this 'wearing out' phenomenon. I've formatted it but it still remains on 4mb capacity! What could have happened?? I don't recall doing any thumb drive no-nos recently...
05-May-2009