Industry Insights

Deallocate at the FTL Level: How Trim and Write Zeroes Change GC Copy Volume

By JH SemiconductorTrim / Write Zeroes / Deallocate

Trim and Write Zeroes are two different contracts in NVMe and take different paths through the mapping layer. This piece looks at how each changes per-block valid page counts, and how command granularity and alignment erode the benefit.

Two Commands, Two Different Contracts

The Deallocate bit in Dataset Management is a hint: the host declares a range of LBAs no longer useful, and the drive may act on it or ignore it. What a subsequent read returns is governed by the DLFEAT field in Identify Namespace. Write Zeroes, by contrast, is a hard promise — reads must return zeros. That difference decides how much freedom the firmware has. Deallocate can be a pure mapping update; Write Zeroes, if taken literally, burns a program cycle writing zero pages. The right implementation keeps it in the mapping layer too, pointing the range at a zero marker and demoting a data write to a metadata update.

Valid Page Count Is What Scheduling Actually Reads

Victim selection is driven by each block's valid page count. Once mappings are invalidated the count drops immediately, the block rises in the selection queue, and the data that must be relocated when it is picked genuinely shrinks. The gain comes not from the delete itself but from how promptly the count is updated. If firmware defers deallocation to a lazy background pass, garbage collection still sees stale counts during that window and still copies the old volume. We therefore complete the mapping update inside the foreground command path and only make the log persistence asynchronous.

What Granularity and Alignment Take Back

The mapping table is organised at a fixed granularity. Fragments that fall inside a granule boundary cannot be invalidated wholesale and keep their original mapping. When the filesystem releases space in 4KB units and the drive maps at a coarser granularity, that residue measurably weakens the effect. Dataset Management lets a single command carry many LBA ranges, collapsing hundreds or thousands of discrete intervals into one submission. That cuts command overhead and lets firmware sort and merge before touching the map, assembling cross-granule fragments into whole units.

The Curves We Watch in Regression

On the J750/J770 engineering platform we drive random writes to steady state, inject Deallocate at varying coverage, and record three curves: write amplification, bytes relocated by garbage collection, and the recovery of 4KB random write throughput (targets of 300 KIOPS for J750 and 600 KIOPS for J770). The criterion is not peak height but whether the time constant of the recovery is predictable — an unpredictable recovery is harder to live with in database and virtualisation workloads than a lower plateau. The products are at the product-definition/EVT stage and this case set is part of firmware regression.

Keywords
TrimWrite ZeroesDeallocategarbage collectionwrite amplificationvalid page countJH Semiconductor