Abstract
LearnedFTL is a novel flash translation layer (FTL) that employs lightweight machine learning models to predict the physical location of data on an SSD. By integrating piece-wise linear models with a fail-safe bitmap filter and a virtual address representation, it effectively bypasses the costly "double read" penalty common in random workloads. Evaluation shows that LearnedFTL reduces tail latency by up to 12.2× compared to state-of-the-art schemes while maintaining a minimal memory footprint.
Introduction: The Double Read Problem
In modern SSDs, the Flash Translation Layer (FTL) maps Logical Page Numbers (LPNs) from the host OS to Physical Page Numbers (PPNs) on flash chips. As SSD capacities grow, these mapping tables become too large to fit entirely in the SSD's limited DRAM (e.g., 20GB for a 10TB SSD). Standard designs like DFTL cache only the most frequently used mappings. When a cache miss occurs—a frequent event during random read workloads—the SSD must perform a double read: first fetching the mapping table from flash, then reading the actual data. This significantly increases latency.
Previous attempts to use "learned indexes" to predict addresses often suffered from inaccuracy. These inaccuracies led to "triple reads" (reading the model, then an error correction interval, then the data) or high computational overhead during write operations.
Methods: Making Learned Indexes Practical
LearnedFTL introduces three primary innovations to integrate learned indexes into SSD controllers efficiently:
- In-place-update Linear Model with Bitmap Filter: Instead of complex neural networks, LearnedFTL uses simple piece-wise linear models ($y = kx + b$). To ensure accuracy, it adds a bitmap filter. Each bit corresponds to an LPN; a '1' indicates the model's prediction is guaranteed to be accurate, allowing the SSD to jump straight to the data. A '0' triggers a standard, safe flash-based lookup.
- Virtual PPN (VPPN) Representation: Learned models perform best with contiguous data. However, SSDs strip data across parallel channels and chips for performance. LearnedFTL creates a "Virtual PPN" by reordering address fields (channel, chip, block, etc.), making physically scattered data appear contiguous to the model without sacrificing hardware parallelism.
- Group-based Allocation and GC-Training: To avoid bottlenecking the write path, LearnedFTL groups mappings and trains models during Garbage Collection (GC) or background rewrite cycles. This hides the computational cost of learning within existing background maintenance tasks.
Evaluation and Results
The authors evaluated LearnedFTL using a FEMU-based prototype (a high-performance QEMU-based SSD emulator) across synthetic benchmarks (FIO), real-world applications (RocksDB), and standard storage traces (WebSearch, Systor17).
Key results include:
- Reduced Latency: Compared to state-of-the-art TPFTL and LeaFTL, LearnedFTL reduces P99 tail latency by 2.9× to 12.2× (averaging 5.5× and 8.2× respectively).
- Fewer Flash Operations: It reduces address translation-induced double reads by up to 55.5%.
- Improved Throughput: In random read scenarios, LearnedFTL outperforms traditional DFTL by 1.5×.
- Efficiency: The system achieves nearly 90% of the performance of an "Ideal FTL" (infinite DRAM cache) with a tiny memory footprint and reduces energy consumption by up to 1.2× in read-intensive workloads.
Discussion and Future Work
The core insight of LearnedFTL is the "safety valve" approach provided by the bitmap filter. By acknowledging model fallibility, the system avoids the "triple read" penalty that hindered previous learned FTLs like LeaFTL. Furthermore, the VPPN demonstrates that physical layout contiguity is a matter of mathematical perspective, enabling simple linear models to thrive.
While effective, LearnedFTL still incurs some model space overhead (128 bytes per 512 mappings). Future work may explore lower-precision data types (e.g., Float8) or bitmap compression to further reduce this footprint. Additionally, while the emulator results are promising, physical implementation on ASIC/FPGA-based controllers remains the ultimate validation step.
Summary updated