Storage, Buses & I/O

the flash translation layer

/ F-T-L /

Operating systems and software want a simple, friendly storage device: 'here is block number 5000, please overwrite it.' But raw flash refuses to play along — you cannot overwrite a page in place, and you must erase a whole big block before reusing any page in it. The flash translation layer, or FTL, is the clever firmware inside an SSD that bridges this gap. It is a translator and bookkeeper that lets the outside world keep its simple 'read/write any block' view while it quietly does the awkward flash dance underneath.

Its core trick is indirection: the FTL keeps a map from logical block addresses (the numbers software uses) to physical flash pages (where the data actually lives). When software 'overwrites' logical block 5000, the FTL does not touch the old physical page; it writes the new data to some already-erased page elsewhere, updates the map so 5000 now points there, and marks the old page invalid. Later, a background process called garbage collection finds blocks full of invalid pages, copies any still-valid pages out, and erases the whole block to make it reusable. This is also where wear leveling lives, steering writes so erasures spread evenly.

Why it matters: the FTL is the reason an SSD can pretend to be a drop-in replacement for a hard disk despite flash's strange constraints. It is also why SSD behaviour can be subtle. Garbage collection competes for the device while it runs, so write performance can vary; the extra physical writes the FTL performs per logical write are called write amplification, and they both slow things down and consume the cell's limited lifetime faster. The FTL is firmware doing a hard job invisibly — and most of the time, beautifully.

Software writes logical block 5000 three times. Physically, the FTL writes to page A, then to page B (mapping 5000 to B, marking A invalid), then to page C. Logical block 5000 stayed put for software, but three different physical pages were used and two now await erasure during garbage collection.

One logical block, many physical pages: indirection is what lets flash fake in-place overwrite.

Write amplification means one logical write can cause several physical writes (relocations plus eventual erase). This is why naive write-heavy workloads can wear an SSD faster than its raw byte count suggests.

Also called
FTLflash translation layer快閃轉換層