ScaleDefrag: Design and implementation of a scalable file defragmentation tool for flash-based SSDs - Sangjin Lee; Sunggon Kim; Yongseok Son (PLoS ONE, 2026)
We propose ScaleDefrag , a parallel and asynchronous defragmentation tool that reduces defragmentation time by up to 3.8× compared to e4defrag , while improving scalability on multi-core systems. Flash-based solid-state drives (SSDs) have been widely adopted in various large-scale storage systems including cloud and HPC environments. Unfortunately, even with high-performance flash-based SSDs, intensive file modifications can provoke file fragmentation by scattering file data across non-contiguous blocks and splits large requests into several smaller I/O requests, which degrades performance. To address this fragmentation issue, the defragmentation technique gathers the scattered blocks into contiguous space. However, the current technique does not scale well since the defragmentation process is performed by a single defragger sequentially and synchronously. ScaleDefrag scales the defragmentation process as follows. Specifically, we first devise an information collector that gathers metadata for all target files before parallel defragmentation. Second, to realize parallel defragmentation, we devise multiple defraggers with the previously collected file information, enabling a one-to-one (defragger-to-file) model. Finally, we adopt an asynchronous I/O strategy to enable each defragger to issue multiple requests for the scattered blocks and complete them asynchronously. We implement ScaleDefrag and evaluate its performance on a multi-core machine with a flash-based SSD. Our evaluation results on a commodity SSD show that ScaleDefrag reduces defragmentation time and increases defragmentation throughput across various workloads, while also mitigating the slowdown experienced by a co-running application compared with e4defrag .