Re: Lifetime of flash memory

From: Kalin KOZHUHAROV
Date: Wed Mar 22 2006 - 22:42:59 EST


John Richard Moser wrote:
> I have a kind of dumb question. I keep hearing that "USB Flash Memory"
> or "Compact Flash Cards" and family have "a limited number of writes"
> and will eventually wear out. Recommendations like "DO NOT PUT A SWAP
> FILE ON USB MEMORY" have come out of this. In fact, quoting
> Documentation/laptop-mode.txt:
>
> * If you're worried about your data, you might want to consider using
> a USB memory stick or something like that as a "working area". (Be
> aware though that flash memory can only handle a limited number of
> writes, and overuse may wear out your memory stick pretty quickly.
> Do _not_ use journalling filesystems on flash memory sticks.)

I thought that journaling filesystems happen to overwrite exactly the same
place (where the journal is) many times... Am I mistaken?

So the effect is what we had for floppies (some many years ago) where sector
0 and others where FAT structure was kept were overused and start giving
errors - so the only solution was to throw away that floppy.

Hard disks had the same problem, but they have algorithms to relocate bad
clusters.

So do these "leveling algorithms" refer to the same? Relocating bad cells?
If not, you can see how a journaling system can fry a CF card quickly.

>
> The question I have is, is this really significant? I have heard quoted
> that flash memory typically handles something like 3x10^18 writes; and
> that compact flash cards, USB drives, SD cards, and family typically
> have integrated control chipsets that include wear-leveling algorithms
> (built-in flash like in an iPaq does not; hence jffs2). Should we
> really care that in about 95 billion years the thing will wear out
> (assuming we write its entire capacity once a second)?
>
> I call FUD.

3x10^18 is a bit overstating, IMHO. Don't have a reference now.

Kalin.

--
|[ ~~~~~~~~~~~~~~~~~~~~~~ ]|
+-> http://ThinRope.net/ <-+
|[ ______________________ ]|

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/