Re: NAND flash misery



Vladimir Vassilevsky wrote:

Guess how many bad blocks are typical for NAND flash of several GB capacity? As many as 2 percent! There could be the whole areas of hundreds of megabytes of the contiguous bad cells, as well as the random scatter.

It is possible to do the extensive read/write test to find the most of the unreliable blocks; but it takes many hours.

I didn't encounter this problem until we started to use the high capacity CF cards. The bad blocks were very rare for the cards of 1GB and below. Since the flash iself is hidden behind the IDE interface and a compatible file system, and the read/write performance is critical, it is generally impossible to apply an error correction scheme.

I was under impression that flash is more reliable then HDD; now I see that it is not so. Do you know how reliable are the IDE flash drives?


NAND flash always has defects in manufacturing - the devices are designed to cope with a certain level of faults to make manufacturing cheaper (the same applies to many other types of chips, and hard disks). Each sector in NAND has extra space for error correction and detection (IIRC, 512 byte sectors are actually 528 bytes in size). Bad blocks can be detected and marked during manufacture and testing, and blocks that go bad (due to wearing out) are detected in use and the data moved to different blocks.

The same thing is done with hard disks - the controller detects bad blocks, and re-maps them. There are a few differences, however - on hard disks, you get bad blocks in manufacturing but it is rare that a good block goes bad in use. With flash, the controller can almost always spot a bad block and recover the data (since it's normally a single bit failure, the ECC will fix it), while on a hard disk you lose data. And on flash, a remapping makes no difference to performance - on a hard disk, it's equivalent to file fragmentation.

CF cards and other earlier flash devices are not that great at wear levelling and bad block handling (that's one of the reasons for flash-specific file systems like YAFS and JFFS2). Modern IDE, SATA and SAS flash drives are far better. Good manufacturers quote MTBF numbers that are orders of magnitude higher than for hard disks, and wear is no longer a practical issue for larger flash disks (I've seen flash disks spec'ed for *continuous* 20 MB/s writes for years). See also <http://wiki.eeeuser.com/ssd_write_limit> - a 4 GB Eee PC disk should be fine for a normal user for 25 years. And since wear is levelled across a disk, a 128 GB disk will survive 32 times as much use for the same time.

.



Relevant Pages

  • Re: NAND flash misery
    ... A HDD has one big problem: the lifetime tends to go to the end when it ... a flash card is easy to swap. ... 256 GB and bigger flash disks, even high quality hard disks are no ...
    (comp.arch.embedded)
  • Re: NAND flash misery
    ... a flash card is easy to swap. ... wear, the longer the lifetime, and the more you read rather than write, ... is really no point to bother about the wear leveling. ... 256 GB and bigger flash disks, even high quality hard disks are no ...
    (comp.arch.embedded)
  • Re: NAND flash misery
    ... I didn't encounter this problem until we started to use the high capacity CF cards. ... Since the flash iself is hidden behind the IDE interface and a compatible file system, and the read/write performance is critical, it is generally impossible to apply an error correction scheme. ... Each sector in NAND has extra space for error correction and detection. ... The same thing is done with hard disks - the controller detects bad blocks, ...
    (comp.arch.embedded)
  • Re: NAND flash misery
    ... Do you know how reliable are the IDE flash drives? ... HDDs wear out through use. ... For common desktop usage, a 32 GB flash disk will probably far outlast a typical hard disk - with 256 GB and bigger flash disks, even high quality hard disks are no longer competitive on reliability and lifetime for real applications. ...
    (comp.arch.embedded)
  • Re: HDD size
    ... sectors is hidden from the user and will not be taken from the declared ... 100GB + the hot fix capacity. ... As hard disks manage their own hot fixing, ... to the end user and the disk appears defect fee UNTIL the hotfix space ...
    (uk.comp.homebuilt)