Wear Levelling and How it Impacts SSD Life Expectancy

October 15, 2020

Story

It is essential to ensure that all the blocks have a comparable number of erasures so that the life and reliability of the SSD are maximized.

SSD Life Expectancy

Data in flash memory is arranged in a hierarchy of cells, pages, and blocks, with data written a page at a time. NAND flash memory architecture is such that erasing can only occur at the block level. Also, access to the data in a solid state drive (SSD) is usually localized. There will be some data that is rarely used, or only accessed for reading, and other data that is frequently updated.

However, there is a limit to the number of times flash cells can be erased. After the limit is reached, the flash cells become increasingly less reliable. Errors can be corrected, but frequent errors indicate that a block is reaching the end of its useful life.

If some blocks are written to, and hence erased, more frequently than others, then they will become unusable earlier than others. As a result, excessive rewriting on some blocks will reduce the SSD’s capacity and, eventually, the usable lifetime of the whole flash memory.

Wear Leveling

It is essential to ensure that all the blocks have a comparable number of erasures so that the life and reliability of the SSD are maximized. This process is called “wear leveling.”

Wear leveling is a function that is carried out by most flash memory controllers. By evening out the use of blocks in the flash memory, the controller can spread out wear evenly across all the blocks. The most straightforward approach to wear leveling is to count how many times each block has been erased. When a block is needed to store some data, the empty block with the lowest erase count is used.

There are two kinds of wear leveling: dynamic wear leveling and static wear leveling.

Dynamic Wear Leveling

Dynamic wear leveling has the disadvantage of only working for blocks that are being written.

For example, a family might get a new SSD and immediately fill half of it with family photos. Those blocks will have an initial erase count of 1. And suppose the other half of the SSD stores the results of the family’s common activities, such as creating, editing, and copying documents, causing the erase count on that half to steadily increase. Meanwhile the erase count on the first half of the SSD remains at 1.

As a result, the two halves of the SSD would have a noticeably different level of wear. The half with the greater wear would shorten the SSD’s life span.

Static Wear Leveling

Therefore, it is essential to make sure that the uneven use of different blocks in the SSD does not shorten the life of the SSD.

The technique called “static wear leveling” increases the use of the rarely used blocks to spread out the erase counts. When the SSD controller erases a block, that block’s erase count is compared with the erase counts of currently used blocks. If the difference between the former and the latter reaches some predefined threshold, then one of the presently used blocks will be freed up for future use.

For example, assume the wear-level threshold is 32. When the controller erases a block for the 33rd time, it will see that the block’s number has exceeded the limit by 1. Then the controller will copy photos from one of the long-occupied and little-used blocks into the newly erased block. While this maneuver will increase the total erase count by 1, it will also move the little-used blocks to the list of empty, available blocks. As a result, this process ensures that all of the blocks in the flash memory are evenly used to achieve wear leveling and ensure the maximum longevity of the flash memory.

Performance Impact

Because static wear leveling must occur as a background task to avoid adversely affecting the SSD’s read and write speed, the process can be time-consuming. Different manufacturers may take slightly different approaches to wear leveling, which may have different effects on SSD performance or reliability.

A capable flash controller is tuned for different types of flash memory, such as SLC, MLC, TLC, or QLC, and the specific flash device properties. Users will not even be aware of the wear leveling happening. As a result, the SSD life span has just been extended.


Axel Mehnert is responsible for marketing, product strategy, and business development across product lines and market segments at Hyperstone. He has been involved with the Flash industry for over 15 years. Before joining Hyperstone, he held various positions at technology and semiconductor companies in product marketing, sales, and strategic planning with Siemens, Evergreen Technologies, and Texas Instruments. He holds a BS in economics from Kiel-University, Germany and an MBA from Oregon State University.

Categories
Storage