Is flash drive wear a significant issue?
My netbook has a flash drive instead of a hard disk drive, and I'm using Ubuntu Netbook Remix with ext3 as the file system. I've read some articles concerning flash drive wear, and the main concerns seem to be:
- The amount of write cycles - each cell can be written to only a limited amount of times (Wikipedia has numbers ranging from 1,000 to 100,000)
- You can only write data on a "sector" once, and after that the whole block needs to be erased to use again - and these blocks are ranging from 16 KB to 128 KB.
These are said to add up so that normal file systems that aren't designed to take this into account end up using wearing out the flash drive by moving small amounts of data.
Now I don't doubt that the problem is theoretically very real. However, I know we tech people get easily carried away by interesting optimization problems, such as designing an alternative file system to combat flash wear. For example it's great to do memory optimization, but if you end up saving 100 KB of memory when there's hundreds of MB available anyway, it's not fixing a real problem.
What I end up getting from all this, is that I shouldn't use normal file systems on flash drives because they quickly eat up the drive. But I'm not convinced. So the question is: Is flash drive wear actually relevant in everyday, normal usage? Is my laptop, using ext3, going to eat up my flash drive in few years... or is all of this rather a theoretical problem that does reduce the usage time, but only by so little that it'll never happen in normal conditions? Or is transparent, hardware wear leveling already being used on netbook flash drives to fix the problem, so that an alternative file system wouldn't even do any good?
Sources: (1), (2), (3), (4), (5), (6)
Solution 1:
Generally speaking, Flash drive wear and tear is always brought up (SSD and USB) However, I haven't seen it.
I have personally found that cheap USB Flash drives for example go faulty and simply do not get recognised well before you actually see wear and tear.
Also, newer drives use technologies that randomise the locations of writes. I suppose, lets say you have a 100 GB drive and fill it up with 99.5 GB's, then you keep using .5 GB over and over again, you can reach the limit, but again, I use SSDs and USB sticks on a daily basis for very heavy use (over the past few years) and generally speaking, the drives die of general failures well before you see this as a problem.
No Experience with alternative File Systems, However I personally wouldn't bother... Use a mature file system and if it fails within a usable time, take it back under warranty. (if in the UK, up to ~6 years under the sale of goods act as you can say it was designed with a fault and not fit for the purpose of storing data... I am not a lawyer, but I took a laptop back 4 years after buying for a similar reason).
Also, for Windows just maybe worth a look in, I remember seeing a product from Diskeeper, that looks interesting - meant to optimise and extend the life of SSD disks, but I am wondering if it is needed and found several articles doubting it (only linked to one) and goes in to detail about wear and tear. Also, I can not longer see the product on their website, so it must of either been scrapped or built into a different edition.
Solution 2:
Installing windows on a compact flash card showed this problem very obviously, killing the card within days under certain typical usage patterns. (Linux is a little easier on them)
SSD drives have wear leveling to extend this to years. If you fill the drive up 90% and then keep making writes it will swap out the files which have remained unchanged in order to extend the flash's lifetime.
Defragmenting does not help on a flash drive because the underlying data is not stored in the pattern that the OS sees. You need to use vendor specific tools.
Flash specific filesystems could extend a drive's lifetime further but at the moment I think this is largely made irrelevant by the progress of drive technology. How many hard disk drives do you actually use that are older than 5 years?
The other point is that when blocks fail, they fail on write so you don't really need to worry about data corruption as with an old magnetic drive that is failing.
So basically as long as your drive has wear levelling it is not really something you need to worry about.