Helping people with computers... one answer at a time.

While the technology continues to improve, the fact is that flash memory has a limited number of times it can be written to. It 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.

"Never run disk-intensive applications directly against files stored on the thumb drive."

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.

Article C2618 - April 12, 2006 « »

Share this article with your friends:

Share this article on Facebook Tweet this article Email a link to this article
Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?