Flash Memory life cycle - an opinion

What works, and doesn't, for you. Be specific, and please include Puppy version.
Post Reply
Message
Author
User avatar
BlackAdder
Posts: 385
Joined: Sun 22 May 2005, 23:29

Flash Memory life cycle - an opinion

#1 Post by BlackAdder »

This is from a post on the OLPC developers list by Mitch Bradley, the Open Firmware developer. He was responding to a concern that the flash drive would "wear out" in a short time. It refers specifically to the flash memory in the OLPC XO, but the comments are worth reading in the more general context IMHO. Most of the recent flash devices are based on NAND flash; older devices were NOR flash.
The probability of wearing out NAND FLASH is much less than people seem to think.

The part (i.e. the flash drive in the OLPC) is rated for 100,000 *erase* cycles per block. There are 64
independently-writable 2K pages per block. Writing doesn't count in the
wear calculation - just erasing.

Suppose that you pick one block and use it exclusively. You write one
page, then write another page, etc, and when you have filled all 64
pages, you erase the block and start over.

What would it take to wear out that block over the 5-year design
lifetime of the XO?

100,000 erases / 5 years / 365 days / 24 hours = 2.3 erases/hour. So
you can erase the same block every 26 minutes, 24 hours a day, 365 days
per year, for 5 years before the block is likely to wear out.

But there are 64 pages per block, and you only have to erase after they
are all written. 26 minutes * 60 secs/min / 64 pages = 24 seconds. So
you have to write a page every 24 seconds to wear out that block.

Obviously, if you have a very stupid application that is pounding on one
block and writing/erasing it as fast as it can, or a filesystem layout
that has a very bad hot-spot, then you could wear out a block much
faster. But even then, if it is possible to spare-out a worn out block,
you wouldn't be likely to lose enough blocks over 5 years to make a
significant dent in the device's overall capacity.

Let's look at this another way - how long would it take to wear out the
entire device if you really tried? The typical erase time for a block
is 2 ms, so if you never wrote, just erased over and over, you could do
100,000 erases in 200 seconds. There are 8192 erase blocks in a 1 GB
NAND FLASH, so you could wear out the whole thing in 1.6 million seconds
= 19 days. So you could wear out the device intentionally. But that is
just erasing, not writing.

If you write all the pages before erasing, it takes typically 0.2 mS to
write a page, so writing all the pages of a block then erasing takes (64
* 0.2 mS) + 2 mS = 15 mS. So it would take 140 days to wear out the
device by continuous writing/erasing. Continuous writing/erasing
doesn't happen in any realistic workload, because most applications
don't write data then immediately discard it.

Oh, by the way, 100,000 cycles may be pessimistic. That is the data
sheet rating, but I have heard that single-level NAND FLASH (like the
ones we use) are coming in at more like 1 million erase cycles typical
these days.

The bottom line is that NAND wear-out is not likely to be an issue.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

Re: Flash Memory life cycle - an opinion

#2 Post by Flash »

BlackAdder wrote:This is from a post on the OLPC developers list by Mitch Bradley, the Open Firmware developer. He was responding to a concern that the flash drive would "wear out" in a short time. It refers specifically to the flash memory in the OLPC XO, but the comments are worth reading in the more general context IMHO. Most of the recent flash devices are based on NAND flash; older devices were NOR flash.
... The bottom line is that NAND wear-out is not likely to be an issue.
I agree. No one has yet reported to this forum that they believe they wore out a flash memory. I'd be willing to test a flash memory to destruction if someone would come up with a program that would do nothing but erase and then write to it, then check the written info for errors. (Flash memory "wears out" because many erasures of a memory location causes the difference between a one and a zero stored in that cell to be reduced until it is not possible to say with certainty which value was written to that memory location. Read errors will gradually increase until the memory is unreliable. Contrast this with the typical failure mode of a hard disk drive: sudden catastrophic failure without warning, resulting in the loss of all the data on the disk..)

User avatar
SirDuncan
Posts: 829
Joined: Sat 09 Dec 2006, 20:35
Location: Ohio, USA
Contact:

#3 Post by SirDuncan »

I look at it this way: I have a memory card for my Playstation that I have been using for at least 7 years. Sony used flash memory for their memory cards. My brother and I have been writing to that card fairly constantly for 7 years and not had a failure. What's more, the one person I know who has worn out his card was still able to copy his games over to a new card, he just couldn't save to the old card anymore.

Granted, that's not running an OS from the card, but the card had significantly fewer blocks to write to and screw up. The current PS2 memory card has only 8mb of space, so the cards for the PSX had to be smaller than that, although I do not recall the size off the top of my head.

Anyway, I figure that with Puppy's flash drive life extending practices I should be able to use my flash drive for quite some time (especially since I use a hard drive for most of my computing).
Be brave that God may help thee, speak the truth even if it leads to death, and safeguard the helpless. - A knight's oath

Post Reply