erase before write

Erase-before-write is the physical rule, not a software policy, that makes write amplification unavoidable rather than merely common: a NAND flash cell's floating gate or charge-trap layer can only move in one direction at page-write granularity, and reversing that direction back to the blank state requires a fundamentally different operation that can only be applied to an entire block at once, never to a single page in isolation.

Two Different Tunneling Directions, Two Different Granularities programming adds charge selectively; erasing removes it from everything at once Programming Per-page: each cell's own gate decides Selective, one page at a time Erasing Whole block: one shared substrate voltage No per-cell discrimination possible

The asymmetry traces directly to which terminal carries the voltage that moves electrons across the tunnel oxide. Programming a cell pushes electrons onto its charge-storage layer by applying a high voltage to that specific cell's own control gate, which every cell in a page can receive independently — this is what makes page-granularity programming possible, since each cell's gate voltage is set individually through its own word-line connection. Erasing works by applying a high voltage to the shared substrate underneath an entire block of cells instead, pulling electrons off every floating gate or charge-trap layer in that block simultaneously through the same tunnel oxide mechanism in reverse — but because that high voltage is applied to a substrate region shared by every cell in the block, there is no way to erase some cells in a block while leaving others untouched. The physical structure simply does not provide a per-cell signal for erase the way it does for program.

This explains the specific, asymmetric size hierarchy NAND flash is built around, and why that hierarchy cannot be flattened by better controller design. A page, typically a few kilobytes to tens of kilobytes, is the smallest unit that can be programmed — reads and writes both operate at page granularity. A block, composed of many pages, often a few hundred to over a thousand, is the smallest unit that can be erased — there is no finer erase operation available at any granularity below the whole block, no matter how the controller's firmware is designed. Updating even a single byte within an already-programmed page therefore requires writing an entirely new page elsewhere, since the original page's cells cannot be reprogrammed to a different value without first being erased, and erasing that one page alone is physically impossible without also erasing every other page sharing its block.

Why a Flash Cell Has No "Overwrite" Operation contrast with a disk sector, which rewrites directly, no erase step needed NAND flash cell Program only adds charge Reversal (erase) needs the whole block Magnetic disk sector Magnetization flips either direction True in-place overwrite, no erase step This single asymmetry is the root of an entire storage-management discipline Garbage collection, write amplification, and over-provisioning all exist because of it.
NAND Flash Block: Page-Level Programming vs. Block-Level Erase one block contains many pages; program acts on pages, erase acts on the whole block ONE BLOCK (whole erase unit) Page 1 Can program independently Gate voltage per page Page 2 Can program independently Page 3 Can program independently Page 4 Needs erase but shared with others Shared substrate voltage (erase control) — applies to ALL pages at once Erase pulse Cannot selectively erase one page The fundamental asymmetry: granularity mismatch Programming operates per-page: each page has its own word-line connections that can be controlled independently. Erasing operates per-block: the substrate voltage is shared across the entire block, with no per-page discrimination possible. To update one page, you must erase the whole block and reprogram all the pages you want to keep — this is the root cause of write amplification in NAND flash.

A magnetic hard disk sector has no equivalent constraint, which is precisely why flash-specific storage management exists as its own discipline rather than being a universal feature of all block storage. A disk's magnetic domain can be set directly to whatever orientation the new data requires, in a single operation, with no separate step needed to first return it to some neutral state — true in-place overwrite, something NAND flash structurally cannot offer at page granularity. Every mechanism this series has already covered downstream of this constraint — garbage collection, write amplification, over-provisioning — exists specifically because this one asymmetry makes a direct software analogy to disk overwriting impossible; a flash translation layer's entire job is to present something that looks like ordinary overwritable storage to the host while actually performing relocate-then-erase operations underneath, because the physical medium itself cannot support anything simpler.

Erase operations are also measurably slower and more electrically stressful than program operations, which compounds the cost beyond simple granularity. Programming a page typically takes on the order of hundreds of microseconds; erasing a block typically takes several milliseconds, an order of magnitude longer, because the whole-block high-voltage pulse must drive enough electrons back across the tunnel oxide for every cell simultaneously rather than addressing cells individually. Each erase cycle also stresses the tunnel oxide directly, contributing to the same finite-endurance wear-out mechanism that limits how many total program-erase cycles a cell can survive before it can no longer reliably hold a charge — meaning every block reclaimed by garbage collection carries both a time cost and a wear cost, on top of whatever write amplification that reclaim operation itself produced.

OperationGranularityTypical latencyWhat it does physically
ReadPageTens of microsecondsSenses stored charge level, no charge moved
ProgramPageHundreds of microsecondsAdds charge selectively via each cell's own gate
EraseBlockSeveral millisecondsRemoves charge from every cell via shared substrate voltage

Erase-before-write is the single physical fact every NAND flash management technique in this series ultimately works around, never eliminates. Garbage collection, write amplification, and over-provisioning are not independent design choices — they are the direct, unavoidable consequences of a storage medium that can add information one page at a time but can only take it away one entire block at a time.

Go deeper with CFSGPT

Get AI-powered deep-dives, save terms, and run advanced simulations — free account.

Create Free Account