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 thumb drive, 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 thumb drives “wearing out”, and that sooner or later, probably sooner, the data on my thumb drive would become corrupt. Is that true? Do these USB drives actually wear out?
I strongly recommend that you backup the contents of that drive – yes, sooner rather than later. And perhaps even rethink how you’re sharing that data.
Flash memory “wears out”.
Become a Patron of Ask Leo! and go ad-free!
Putting the flash in flash memory
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 in this manner 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.
Some flash memory chips, perhaps even most, now also include circuitry to avoid “bad bits”. That means if a portion of the flash memory finally wears out and goes bad, the chip itself can compensate, and it will look to the user like everything is fine. Another approach is called “wear leveling.” This spreads the use of flash memory across the entire device, even if you’re only writing to the same spot in the same file every single time.
But these techniques only last so long and only postpone the inevitable.
Now, in your case, you’re using USB thumb drive 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. As a result, the USB drive is still being written to. A lot.
With all that writing going on, reaching the failure point of some random bit or bits in the flash memory stick 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.
Using inexpensive flash memory
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 thumb drive to store it, copy it from the thumb drive 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 ten times daily, you’re looking at 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 thumb drive 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.
Knowing that inexpensive flash memory-based devices will wear out eventually, there’s one other thing you need to make sure to do, and that’s to back up.
If you keep your only copy of important data on a flash drive you are asking for trouble. It will wear out eventually, and your data will become completely unrecoverable.
Remember the “golden rule” of backing up:
If there’s only one copy, it’s not backed up.
If there’s only one copy on a flash drive, its days are numbered.
What about SSDs?
SSDs or Solid State Drives are indeed based on flash memory. And yes, they will wear out too.
Just not as quickly.
There is a difference between the “inexpensive” flash memory I’ve discussed thus far, and the flash memory on SSDs. USB thumb drives; CF, SD and microSD memory cards are all relatively cheap. The type of flash technology they use is, as I’ve described, susceptible to wearing out if written to “too much”. Inexpensive drives can wear out from regular use in a relatively short time span.
Not quite so for SSDs.
SSDs use a more expensive flash technology, and are engineered differently than their inexpensive cousins. Even as prices come down to approach the per-gigabyte cost of thumb drives, the technology remains fundamentally different and often significantly physically larger.
The same problem applies: an SSD will wear out – it just takes a lot longer to do so. In fact, it’s not unreasonable to assume that an SSD used as the primary drive in a computer can outlast the useful lifespan of the computer itself; again, depending on how it’s used. It’ll wear out eventually, but you’ll likely have moved on to another machine before that time.
Regardless, it’s important to remember that any media can and will fail. The differences we’re talking about have to do with how quickly, on average, the failure will happen. Again, based on use, traditional spinning hard drives and SSDs will significantly outlast inexpensive flash drives.
And you need to be backing them up.
All of them.