Abstract
File system "aging"—the performance degradation caused by fragmentation over time—is often dismissed as a solved problem or an issue exclusive to nearly full hard drives. This study demonstrates that modern production file systems (ext4, XFS, ZFS, Btrfs) still suffer massive slowdowns (up to 8x on SSDs and 62x on HDDs) even when storage is nearly empty. By introducing the concept of Natural Transfer Size (NTS), the authors show that logical data locality remains critical for performance on both HDDs and SSDs. The research further proves that write-optimized designs like BetrFS can virtually eliminate aging by maintaining large-scale on-disk locality.
Introduction
File systems are tasked with the impossible: deciding where to place data on a physical device without knowing future access patterns, additions, or deletions. Over time, these decisions inevitably lead to fragmentation, a phenomenon known as "aging." While the systems community has long relied on heuristics like block groups and delayed allocation to mitigate this, a prevailing myth suggests that aging is no longer a "first-order" concern. This complacency stems from the belief that SSDs, lacking moving parts, are immune to logical layout issues, and that modern heuristics are "good enough" until a disk is nearly full.
Methodology: Measuring Aging
To rigorously quantify aging, the researchers introduced several key metrics and frameworks:
- Natural Transfer Size (NTS): This is defined as the minimum I/O size required to reach a target fraction (e.g., 50% or 90%) of a device's peak bandwidth. As shown in Figure 1, both modern HDDs and SSDs require relatively large read sizes—roughly 4MiB—to saturate the hardware's capabilities.
- The Grep Test: A recursive scan across a directory tree used to measure read aging. This captures both intra-file fragmentation (scattered blocks within a single file) and inter-file fragmentation (scattered files within a directory).
- Dynamic Layout Score: A metric tracking the fraction of block requests that are physically consecutive during a workload, serving as a "health" score for on-disk organization.
Key Insights: Why Locality Still Matters
The study reveals that the "solved problem" of file system aging is a myth. Production file systems age rapidly under common workloads. For instance, on ext4, just 1,200 git pull operations can cut read performance in half.
A critical finding is that locality still matters for SSDs. While SSDs do not have mechanical seek times, they rely heavily on internal parallelism, striping, and prefetching. When data is fragmented into chunks smaller than the NTS (4MiB), these hardware-level optimizations fail, leading to 2–6x performance degradation.
Furthermore, the research highlights that creation order is destiny. File systems are extremely sensitive to the order in which files are created. Simply copying a directory tree in a semi-random order versus a depth-first search order can slow down subsequent reads by 2–10x on HDDs.
Experimental Results
The researchers evaluated six file systems: ext4, XFS, Btrfs, ZFS, F2FS, and the research prototype BetrFS.
- Staggering Slowdowns: After a simulated
gitworkload on an HDD, production file systems took over 4 minutes to scan 5GiB of data. F2FS and ZFS performed even worse, taking 50 and 60 minutes, respectively. In contrast, BetrFS took less than one minute. - SSD Impact: On SSDs, the same
gitworkload caused 2–6x slowdowns across all production file systems. - Full vs. Empty Disks: Surprisingly, for the
gitworkload, disk fullness was not the primary driver of aging. On ext4, a full disk only added a 20% penalty; for others, the impact was negligible. The primary cause of aging was the workload pattern itself. - The BetrFS Advantage: BetrFS, based on $B^\epsilon$-trees, exhibited essentially zero aging. It achieves this by using large (4MiB) nodes that match the hardware's NTS, batching updates, and physically rewriting data in large chunks to maintain logical locality.
Conclusion
Modern file systems are highly susceptible to aging, even on high-performance SSDs and when storage is mostly empty. The reliance on aging heuristics is insufficient for long-term performance stability. However, the success of BetrFS suggests a path forward: by aligning file system data structures with the Natural Transfer Size of the underlying hardware, systems can maintain high performance throughout their lifecycle. Future work must address the trade-offs inherent in such designs, particularly regarding write amplification and stability under extreme space pressure.
Summary updated