Host-side flash GC
Host-side flash garbage collection is storage-space reclamation performed by host software, including filesystem segment cleaning and management of host-controlled flash regions.
A log-structured filesystem reclaims space by selecting a victim segment, checking block liveness and moving survivors. F2FS uses 2 MB segments grouped into sections and zones, and expects a section to match the device's GC unit. [2]
When free segments run low, F2FS chooses victims with few live blocks; background cleaning also considers age. [2]
On a block-interface SSD the FTL collects stale data, needing up to 28% over-provisioning and about 1 GB of mapping DRAM per 1 TB of media. With zones that must be written sequentially and explicitly reset, that work moves to the host. On identical 2 TB hardware a ZNS configuration sustained 1010 MiB/s of writes against 370 MiB/s with 7% and 590 MiB/s with 28% over-provisioning. In the paper's RocksDB overwrite experiment, device write amplification was 2.0x with XFS and 2.4x with F2FS on the block-interface SSD, versus 1.0x with F2FS on ZNS and ZenFS. These are different configurations, not successive stages; the reported device metric does not include all host-side rewriting. [3]
The zone-aware ZenFS backend tracks which files have extents in each zone and resets a zone once all of them are deleted, leaving about 10% of zone space unused. [3]
Filesystem cleaning and device garbage collection can coexist. F2FS above a conventional block-interface SSD moves live filesystem blocks but does not itself erase physical NAND blocks; the controller still manages those. Reclaiming a filesystem segment is not the same operation as resetting a host-managed zone. [4]
Relations
- related
- Garbage collection (flash), Flash translation layer (FTL), TRIM, Open-channel SSD, Zoned namespaces (ZNS), F2FS, Zoned block device (ZBD), Write amplification, Over-provisioning, F2FS slack space recycling, NAND copyback, SFS
Advantages
- Background cleaning can be switched off, and a host layer can use application knowledge for data placement. [2, 3]
Limitations
- F2FS on ZNS still pays host cleaning cost, because its large sections move more data per clean. [3]
- A host FTL shares CPU and DRAM with applications, and zones of hundreds of megabytes to a few gigabytes (16 to 128 dies per stripe) limit placement freedom. [3]
- Most file systems write in place and are hard to adapt to sequential-write and reset rules. [3]
Citations
- Linux kernel documentation: F2FS (Flash-Friendly File System)
- Bjorling et al. ZNS: Avoiding the Block Interface Tax for Flash-based SSDs. USENIX ATC 2021.
- Lee et al. F2FS: A New File System for Flash Storage. FAST 2015, sections 2.2, 2.6 and 3.2.4.
Further reading
Sources & caveats
- The ZNS paper's authors are largely industry-affiliated, and its measurements come from one research platform, RocksDB workloads, a 2 TB drive and Linux 5.9.
- The file-system documentation and the device paper describe different layers, so their figures are not interchangeable.
- Arithmetic: 1010 / 590 = 1.7 and 1010 / 370 = 2.7, matching the paper's stated range.