Abstract
Modern NVMe SSDs face significant tail latency challenges due to "page victimization," where the operating system flushes dirty data to the drive, overwhelming its internal DRAM buffer. We present FastDrain, a hardware-software co-design that enables bidirectional communication between the host and SSD to manage buffer occupancy. By utilizing a latency-aware Flash Translation Layer (FTL) that prioritizes fast LSB writes for urgent data, FastDrain reduces 99th percentile response times by up to 84% across various latency-critical workloads.
The Tail Latency Challenge
While modern SSDs offer high throughput and low average latency, they remain significantly slower than system RAM. Operating systems bridge this gap using a page cache to buffer data. However, this creates a "cleaning" problem: eventually, the OS must flush these "dirty" pages to the SSD to free up memory or ensure persistence—a process known as page victimization.
The challenge lies in the SSD's internal DRAM buffer. When the OS suddenly flushes a large volume of dirty data, this buffer overflows. The SSD must then halt user requests to "drain" its buffer into the underlying flash memory. This results in severe "long-tail latency," where requests that typically take microseconds suddenly spike to tens of milliseconds, violating service-level agreements (SLAs) for critical applications like web servers and databases.
FastDrain: A Co-Design Approach
FastDrain addresses this by breaking the "black box" barrier between the OS and the SSD through three primary mechanisms:
- Bidirectional Communication: The NVMe stack is modified to allow the OS to signal the start of a page victimization event. Conversely, the SSD can send an "upcall" to the OS when its internal buffer reaches a critical threshold.
- Adaptive Page Victimization Scheduling: The OS kernel monitors the SSD’s buffer status. If the SSD reports it is overwhelmed, the OS temporarily throttles its flushing activity by dynamically adjusting internal
dirty_ratiothresholds. - Latency-Aware FTL (Flash Translation Layer): Multi-level flash (e.g., TLC) features pages with varying speeds: LSB (fast), CSB (medium), and MSB (slow). FastDrain’s FTL identifies "urgent" buffer drains and writes that data exclusively to fast LSB pages across all available flash dies. This clears the internal buffer at the hardware's theoretical limit to resume normal service quickly.
Key Results and Performance
The researchers evaluated FastDrain using the Amber full-system simulator across six latency-critical workloads, including Apache web services, key-value databases, and image servers.
FastDrain reduced the 99th percentile response time by an average of 84% compared to a conventional "Vanilla" system. In standard systems, tail latency was often 9x longer than average latency; FastDrain significantly narrowed this gap, providing much more predictable performance. Furthermore, while prior attempts to use fast pages often wasted flash space, FastDrain's FTL manages pointers to utilize 90% of flash pages, maintaining high storage efficiency.
Limitations and Future Work
Despite its performance gains, FastDrain requires modifications across the OS kernel, NVMe driver, and SSD firmware, which may hinder adoption in proprietary off-the-shelf hardware. Additionally, the system relies on a finite amount of LSB-only space; extreme, sustained write pressure could exhaust this fast region. Future work is needed to explore the long-term impact of this fragmented writing style on garbage collection overhead and drive endurance.
Summary updated