SSD basic

As you know Solid State Drives(SSDs) use solid state memory NAND chips, which flash memory is made up of cells which store one or more bits of data each. These cells are grouped into pages, which are the smallest discrete locations to which data can be written. The pages are collected into blocks, which are the smallest discrete locations that can be erased.

SSD write limitation

To be noted is that flash memory cannot be directly overwritten like a hard disk drive; it must first be erased. Thus, while an empty page in a block can be written directly, it cannot be overwritten without first erasing an entire block of pages.
So as the drive is used, data changes, and the changed data is written to other pages in the block or to new blocks. At this point, the old (stale) pages are marked as invalid and can be reclaimed by erasing the entire block. To do this, however, any still-valid information on all of the other occupied pages in the block must be moved to another block.

The requirement to reuse old pages on SSD

The requirement to relocate valid data and then erase blocks before writing new data into the same block causes write amplification; the total number of writes required at the flash memory is higher than the host computer originally requested. It also causes the SSD to perform write operations at a slower rate when it is busy moving data from blocks that need to be erased while concurrently writing new data from the host computer.

SSD Garbage Collection

SSD controllers use a technique called garbage collection to free up previously written blocks. This process also consolidates pages by moving and rewriting pages from multiple blocks to fill up fewer new ones. The old blocks are then erased to provide storage space for new incoming data. However, since flash blocks can only be written so many times before failing, it is important to also wear-level the entire SSD to avoid wearing out any one block prematurely.