Regarding the service life of SSD industrial storage, we often hear a saying: write amplification is the real killer of SSD life.
Why do you say that? What is write amplification? I will take you to find out today.
About SSD erasing
SSD flash memory has a limit on the number of erasing and writing, which means that its life span is limited. A complete erasing of flash memory is called P/E once, so the life of flash memory is based on P/E.
SSD life calculation
According to the operating nature of flash memory, it is not difficult for us to get the formula for calculating SSD life, namely:
Take TLC particles as an example. Its erasing times are about 1000 P/E. If we write 10GB of data to a 120G SSD every day, then the lifespan of the SSD=120GB*1000/10/365=33 years.
33 years? Is the calculation wrong? There is nothing wrong, but this is a theoretical value. To calculate the true life of the SSD, an important influencing factor-write amplification must be considered.
What is write amplification?
Write amplification is an undesirable phenomenon of SSD, that is, the actual amount of physical data written is multiple times the amount of written data.
For example, when data is written to the SSD for the first time, the cells are all in an erased state, so the data can be written directly, one page at a time (usually 4 to 8KB in size). At this time, there is no write amplification.
However, if the cell is in the write state, write amplification will occur. We use 8KB Page, 1024KB Block (128Page) to calculate, and 127 pages have already written data, then the result will become like this:
The small square is Page, and the large square is Block. 127 pages in this block are all written with data, and only one page is empty. If there happens to be an 8KB of data to be written, it is reasonable to fill it up, but it can't. The operation of the SSD at this time is to read out the data in the original 127 pages, then erase the data in the entire block, and then write the 8KB data into the block together with the data in the previous 127 pages.
The direct consequence of this is that I originally only wanted to write 8KB of data, but when I actually wrote 1024KB, the data capacity was enlarged by 128 times. Therefore, write amplification has become a major nemesis of SSD life.
How to deal with write amplification
In order to reduce the negative impact of write amplification, users should try their best to leave some space for the SSD when using the SSD. If data is written in a blank die, there will be no write amplification.
However, with the growth of SSD usage time, the available space will definitely become less and less, so simply relying on blank blocks is not feasible. It also depends on technologies such as GC garbage collection, Trim, and wear leveling in the master control for full protection.