Wear Leveling

Because the NAND flash cells in consumer SSDs will eventually run out, it’s important to have a mechanism to evenly use the blocks available. NAND flash must be erased in blocks before it can be rewritten via a program-erase cycle (PEC) and there’s a limit to the amount of times this can happen - the material of the cell that helps it retain a charge will slowly break down over cycles. To prevent the SSD from failing early due to a series of bad blocks the controller therefore must keep track of individual block wear and proactively work to maintain a similar level of wear across the flash.

This process is known as wear-leveling. Traditionally, there have been two types of wear-leveling: static and dynamic. Dynamic wear-leveling will pick blocks with the lowest erase count from among free blocks when it’s time to do a new write. On the flip side, static wear-leveling will consider all blocks in its analysis. Blocks that have become stale with data, or static, may be copied and erased if the erase count of the source block is sufficiently low relative to other blocks. In modern drives, this is done across all of the flash as a single pool rather than on a per-die basis.


Wear Leveling

Modern drives tend to track wear characteristics with a block table, which will include information such as the last erase time. Additional information allows for more advanced wear-leveling algorithms, for example ones based on the “temperature” of the data by tracking age and access rates. Further, because modern 3D NAND has significant internal variation from etching deep layers, the characteristics of cells and blocks within a die are unequal. Therefore, more advanced wear-leveling techniques can improve endurance by balancing effective levels of wear using more sophisticated data.

Wear-leveling is an essential part of garbage collection (GC), or maintenance, and our NVMe SSDs all employ modern techniques to keep the flash operating at optimal performance levels with ample endurance, as well. SSDs perform better and last longer if blocks are freed and utilized intelligently. This includes SLC caching, which can complicate GC, so a balance must be struck to ensure the best and most reliable user experience. We’re always working with controller manufacturers to have the best features available in firmware.