TL;DR
This paper introduces LearnedFTL, a novel Flash Translation Layer (FTL) for SSDs that leverages machine learning (learned indexes) to significantly reduce "double reads," a major performance bottleneck in random read operations. By intelligently combining learned indexes with traditional FTL techniques, LearnedFTL achieves substantial improvements in tail latency and throughput, especially for random access workloads.
What Problem Does This Paper Address?
Modern Solid State Drives (SSDs) use a Flash Translation Layer (FTL) to manage the complex mapping between logical block addresses (LBAs) used by the host and physical flash memory addresses (PPAs). As SSD capacities grow, storing the entire mapping table in fast DRAM becomes impractical, leading to page-level FTLs that use caches (like the Cached Mapping Table or CMT) to store frequently accessed mappings. When a requested mapping isn't in the cache (a cache miss), the SSD must perform an extra read from slower flash memory to fetch the mapping, resulting in a "double read" – one read for the mapping and another for the actual data. This double-read problem is particularly severe for random read workloads, where data access patterns lack locality, making caches ineffective and significantly degrading performance. Existing solutions like demand-based FTLs (DFTL) struggle with random reads, and even advanced learned index approaches (like LeaFTL) can introduce triple reads due to prediction inaccuracies.
Methods
LearnedFTL introduces a learning-based page-level FTL that integrates learned indexes into the existing demand-based FTL (specifically, TPFTL). Its core innovations include:
- In-Place-Update Linear Model: A piecewise linear regression model that learns the LPN-PPN mapping. Crucially, it includes a bitmap filter for each model. This filter tracks the accuracy of predictions for individual LPNs, allowing LearnedFTL to only use the model for predictions it's confident about, thus avoiding inaccurate predictions that would lead to double reads. This also enables in-place updates of the model parameters without requiring full retraining.
- Virtual PPN (VPPN) Representation: To address the challenge of non-contiguous physical page addresses (PPNs) arising from SSD parallelism, LearnedFTL proposes a VPPN representation. This transforms scattered PPNs into contiguous ones, which is essential for training the learned index models effectively.
- Group-Based Allocation and Model Training: To reduce the overhead of model training, especially during random writes, LearnedFTL uses a group-based allocation strategy. This allocates contiguous flash blocks to groups of GTD entries, facilitating efficient model training during garbage collection (GC) or rewrite operations. It also employs opportunistic cross-group allocation to manage hot groups and avoid premature GC.
- Hybrid Approach: LearnedFTL combines the strengths of demand-based FTLs (for locality-aware workloads) and learned indexes (for random workloads), aiming for efficient performance across all access patterns.
Datasets
The paper evaluates LearnedFTL using:
- FIO Benchmark: A widely used tool for evaluating storage performance, used for random and sequential read/write tests.
- Filebench: Utilized for evaluating performance under various workloads (fileserver, webserver, varmail), including those with high locality.
- Real-world Traces: Three WebSearch traces and one Systor trace, representing read-intensive and enterprise storage traffic, respectively, to assess performance under realistic conditions.
No new datasets were introduced; instead, existing benchmarks and traces were used to evaluate the proposed FTL design.
Key Insights and Ideas
- Double Reads are the Root Cause of Poor Random Read Performance: The paper convincingly demonstrates that the address translation-induced double reads are the primary culprit behind the poor random read performance of traditional FTLs.
- Learned Indexes Can Be Effective, But Accuracy is Paramount: While learned indexes offer significant compression and speedup potential, their effectiveness hinges on prediction accuracy. Inaccurate predictions can lead to worse performance than traditional methods.
- A Hybrid Approach is Key: LearnedFTL's success lies in its ability to leverage learned indexes for random access while retaining the robustness of demand-based caching for workloads with locality.
- Bitmap Filters are Crucial for Practical Learned Indexes: The bitmap filter is a critical innovation, enabling confidence-based model usage and in-place updates, which are essential for real-world FTL deployment.
- VPPN Solves a Fundamental Challenge for Learned Index Training: The VPPN representation elegantly addresses the issue of non-contiguous PPNs, making learned index training feasible and effective in parallel SSD architectures.
Key Results
- Reduced Double Reads: LearnedFTL reduces address translation-induced double reads by up to 55.5%.
- Significant Tail Latency Improvement:
- Reduces P99 tail latency by an average of 5.5x compared to TPFTL and 8.2x compared to LeaFTL.
- Achieves P99 tail latency reductions of 2.9x to 12.2x across various real-world traces.
- Improved Throughput:
- Outperforms DFTL, TPFTL, and LeaFTL by 1.5x, 1.4x, and 1.6x, respectively, in random reads.
- Achieves performance close to an "ideal" FTL (89.2% of ideal in random reads).
- Efficient for Locality Workloads: While primarily targeting random reads, LearnedFTL also performs comparably or better than existing schemes in sequential and locality-rich workloads.
- Low Overhead: The additional computational overhead for model training and prediction is minimal, accounting for only a small percentage of GC time and having negligible impact on write performance.
- Reduced Write Amplification: The group-based allocation strategy helps manage write amplification, performing comparably to or better than other schemes in random writes.
Limitations and Future Work
- Model Space Overhead: The paper acknowledges that the space overhead of learned index models is an additional consideration. Future work could explore using lower-precision data types (e.g., Float8) for model parameters and compressing the bitmap filter.
- SSD Rewrite Not Implemented: The FEMU emulator used did not implement SSD rewrite for retention errors, so model training was only performed during GC. Future work could investigate the impact of rewrite-based training.
- Model Complexity: While linear models are effective, exploring more complex learned models for specific scenarios might offer further improvements.
Summary updated