This article is more than 1 year old

'Wear levelling' - a bedroom aid for multi-layer cell Flash

Helps it last longer

Comment Multi-level cell NAND flash doesn't last as long as single-level cell flash but there are ways to increase its life, under the generic heading of wear-levelling.

NAND flash cells have a finite life, in that they only support a specific number of writes before failing to return valid data from a read request. It's necessary to understand some background characteristics of flash before moving on to ways of overcoming this limitation.

Flash is not byte-addressable, unlike disk drives and DRAM. Instead it is block-addressable, with pages of 4KB or so making up blocks of 512KB to 1MB typically, and bytes are written as page writes. A further property of flash is that two access cycles are needed to write data to a block that already contains written data.

Access one is used to erase all the data in the block's cells, a block erase, and access two is used to write the fresh data there. A common problem is that not all the data in a block is invalid and the valid data must be retained.

This means that the write cycle is further complicated by the need to somehow retain the valid data in a cache, delete the block's cells, and then write in the saved valid data and the new fresh data. The whole process is called a read-erase-modify-write cycle, and obviously takes far longer than writing to empty flash cells.

In effect, the single write needed for new data is increased or amplified by additional writes to save the older data. Different flash products have different values for such write amplification and, generally speaking, the lower the value the better. The difference between the amount of data a host wants to write - say 10MB - and the actual data the SSD controller has to write to achieve that - say 27MB - is the write amplification factor.

A factor as close to one as possible is ideal. Our numbers provide a 2.7 write amplification factor, which sounds bad but is actually used by an SSD startup called Anobit, as we shall see.

The greater the write amplification factor, the shorter the working life of the flash and the more its performance will degrade over time.

Garbage collection

All this erasing and writing takes time, and so what generally happens is that the erase part of the write cycle is carried out before an actual data write is needed. The process is called garbage collection, and occurs in the background while the flash is not being used.

The solid state drive (SSD) controller has a map of the NAND it controls and the blocks and their usage. When the host system deletes data stored in the flash it is marked as being invalid in the map.

In quieter periods the controller reviews the map or patrols the flash as some suppliers say and erases those blocks with the most invalid data. As it wants to reduce the number of write cycles a block will undergo, we understand it would generally choose the blocks containing the oldest invalid data and erase those. Such erased blocks are then added to a list of available blocks, the free block pool.

Now, when a write request comes in the data is written to blocks from the free block pool and thus the write is accomplished in a shorter time. Again, we would expect the oldest blocks in the pool to be used as a way of reducing the total of writes over a time period to any one block.

Pliant says it uses background patrol read and memory reclaim and offers unlimited writes with no restrictions limiting the frequency of writing over the rated lifetime of its products, like the LB 200M and LB 400M MLC NAND family.

Next page: Wear-levelling

More about

TIP US OFF

Send us news


Other stories you might like