To understand wear leveling in SSDs, we need to take a quick look at of how NAND Flash memory works:
Data is stored inside the cells in the NAND Flash chips in your solid-state drive. Depending on the type, these cells have a limited number of P/E (Program/Erase) cycles which, when surpassed, makes the NAND Flash less reliable or sometimes non-functional.
NAND Type | P/E Cycles |
---|---|
SLC | ~100,000 – 300,000 cycles |
MLC | ~3,000 – 10,000 cycles |
TLC | ~1,000 – 3,000 cycles |
QLC | ~100 – 1,000 cycles |
Now, the issue is that once any cell crosses its P/E cycles, it may result in data retention issues, read/write problems, and sometimes drive failures. The real problem is that some of the cells or blocks are being used more frequently than others. So, these blocks are prone to more damage while some of the blocks are there with little to no damage at all.
Wear Leveling Comes to the Rescue
So, to prevent this uneven damage to the blocks, wear leveling comes in to distribute the wear. In simple terms, it makes sure that all or most of the cells are facing the damage evenly. The controller and firmware makes sure that some blocks aren’t wearing out completely and go bad while others are sitting idle.

A bit more technically on the cell level, the NAND Flash memory inside our SSDs utilizes floating gate transistors which store the data in the form of an electric charge. Each time the data is written to or erased from the cell, a charge has to pass through a tunnel oxide layer to the floating gate. The floating gate is where the data is stored. This process is known as the P/E cycle.
When charges keep passing through that oxide layer, it wears out. In modern NAND technologies, the oxide layer can be extremely thin, down to sub-10nm, making the layers more prone to wear. Once this oxide layer is worn out, it will result in current leakage and voltage shift. You will notice this as errors increase.
So, the wear leveling makes sure that any specific block isn’t getting utilized while others stay idle. As the wear is evenly divided across memory cells, manufacturers can more easily determine the drive’s overall lifespan in terms of TBW endurance ratings.
Static & Dynamic Wear Leveling
There are generally two types of wear leveling algorithms used: static and dynamic.
Dynamic wear leveling ensures that data is written on the blocks that have undergone the lowest erase count. This wear-leveling algorithm works only on blocks or areas that are not constantly modified in order to create a balance. However, it only considers the blocks that contain changeable data. As a result, the blocks that are rarely used don’t come under dynamic wear leveling.
Dynamic wear leveling predominantly uses blocks that have been freed up and are available for new data storage. It has the advantage of less CPU overhead but a drawback in that the blocks that are in the program state remain idle while some of the free blocks are being used over and over again. It’s called dynamic because it adjusts in real-time, based on how many times each block has been written.
In static wear leveling, the controller actually moves the data to properly divide the wear. There is always a threshold erase count set by the controller. Once, any block reaches that limit, the cells that were sitting idle are erased and programmed. However, the ones with higher wear are used to store the information that those idle blocks were holding.
Usually, static data has a threshold of erase count. The memory blocks that start lagging due to erase count are included in the wear-leveling blocks pool with their static data moved to blocks with higher erase counts. Static wear leveling is considered the best method to increase the lifespan of SSDs.
Example
Let’s say an SSD houses a total of 5,000 memory blocks. The set system parameters, allow up to 3% of blocks to become unreliable or bad over its usage period, equating to a maximum of 150 blocks that can turn bad without disrupting the functioning.
In a daily operation cycle, the SSD is tasked with updating five files every 15 minutes, each file occupying 60 blocks. Despite having a large pool of memory blocks to work with, the SSD, devoid of wear leveling technology, continuously reuses the same set of blocks for each update cycle.
Every hour, the SSD updates a total of 20 files, utilizing a sum of 1200 blocks (20 files × 60 blocks/file). On a daily scale, 28,800 blocks are written and erased (1200 blocks/hour × 24 hours). This brings the annual usage to a significant figure of 10,512,000 blocks (28,800 blocks/day × 365 days/year).
The continuous and repeated use of the same blocks for every update amplifies the wear and tear exponentially. Within a span much shorter than a year, the SSD reaches a stage where the designated set of blocks utilized for the operations exceeds the allowable limit of 150 bad blocks, causing the SSD to fail prematurely.