Table of Contents
Fetching ...

File System Aging

Alex Conway, Ainesh Bakshi, Arghya Bhattacharya, Rory Bennett, Yizheng Jiao, Eric Knorr, Yang Zhan, Michael A. Bender, William Jannen, Rob Johnson, Bradley C. Kuszmaul, Donald E. Porter, Jun Yuan, Martin Farach-Colton

TL;DR

File-system aging arises from fragmentation that degrades read performance over time, even on SSDs and when space is not yet tight. The authors propose a framework that ties device bandwidth to data locality via a natural transfer size and classify fragmentation into intrafile, interfile, and free-space aging, validating it with both real-world and synthetic workloads. They measure aging using recursive scan latency and a dynamic layout score across multiple file systems, including BetrFS, and show that conventional systems age significantly, while BetrFS can nearly eliminate aging on non-full disks. The results motivate design strategies that batch writes and optimize locality, with BetrFS serving as a practical demonstration of a write-optimized dictionary that staves off aging and guides future file-system design.

Abstract

File systems must allocate space for files without knowing what will be added or removed in the future. Over the life of a file system, this may cause suboptimal file placement decisions that eventually lead to slower performance, or aging. Conventional wisdom suggests that file system aging is a solved problem in the common case; heuristics to avoid aging, such as colocating related files and data blocks, are effective until a storage device fills up, at which point space pressure exacerbates fragmentation-based aging. However, this article describes both realistic and synthetic workloads that can cause these heuristics to fail, inducing large performance declines due to aging, even when the storage device is nearly empty. We argue that these slowdowns are caused by poor layout. We demonstrate a correlation between the read performance of a directory scan and the locality within a file system's access patterns, using a dynamic layout score. We complement these results with microbenchmarks that show that space pressure can cause a substantial amount of inter-file and intra-file fragmentation. However, our results suggest that the effect of free-space fragmentation on read performance is best described as accelerating the file system aging process. The effect on write performance is non-existent in some cases, and, in most cases, an order of magnitude smaller than the read degradation from fragmentation caused by normal usage. In short, many file systems are exquisitely prone to read aging after a variety of write patterns. We show, however, that aging is not inevitable. BetrFS, a file system based on write-optimized dictionaries, exhibits almost no aging in our experiments. We present a framework for understanding and predicting aging, and identify the key features of BetrFS that avoid aging.

File System Aging

TL;DR

File-system aging arises from fragmentation that degrades read performance over time, even on SSDs and when space is not yet tight. The authors propose a framework that ties device bandwidth to data locality via a natural transfer size and classify fragmentation into intrafile, interfile, and free-space aging, validating it with both real-world and synthetic workloads. They measure aging using recursive scan latency and a dynamic layout score across multiple file systems, including BetrFS, and show that conventional systems age significantly, while BetrFS can nearly eliminate aging on non-full disks. The results motivate design strategies that batch writes and optimize locality, with BetrFS serving as a practical demonstration of a write-optimized dictionary that staves off aging and guides future file-system design.

Abstract

File systems must allocate space for files without knowing what will be added or removed in the future. Over the life of a file system, this may cause suboptimal file placement decisions that eventually lead to slower performance, or aging. Conventional wisdom suggests that file system aging is a solved problem in the common case; heuristics to avoid aging, such as colocating related files and data blocks, are effective until a storage device fills up, at which point space pressure exacerbates fragmentation-based aging. However, this article describes both realistic and synthetic workloads that can cause these heuristics to fail, inducing large performance declines due to aging, even when the storage device is nearly empty. We argue that these slowdowns are caused by poor layout. We demonstrate a correlation between the read performance of a directory scan and the locality within a file system's access patterns, using a dynamic layout score. We complement these results with microbenchmarks that show that space pressure can cause a substantial amount of inter-file and intra-file fragmentation. However, our results suggest that the effect of free-space fragmentation on read performance is best described as accelerating the file system aging process. The effect on write performance is non-existent in some cases, and, in most cases, an order of magnitude smaller than the read degradation from fragmentation caused by normal usage. In short, many file systems are exquisitely prone to read aging after a variety of write patterns. We show, however, that aging is not inevitable. BetrFS, a file system based on write-optimized dictionaries, exhibits almost no aging in our experiments. We present a framework for understanding and predicting aging, and identify the key features of BetrFS that avoid aging.
Paper Structure (41 sections, 12 figures)

This paper contains 41 sections, 12 figures.

Figures (12)

  • Figure 1: Effective bandwidth vs. read size. Higher is better. Even on SSDs, large IOs can yield an order of magnitude more bandwidth than small IOs. Note that both axes use log scale.
  • Figure 2: Intrafile benchmark: 4 chunks are appended round-robin to sequential data to create 10 400 files. Dynamic layout scores generally correlate with read performance as measured by the recursive grep test; on an SSD, this effect is hidden by the read-ahead buffer.
  • Figure 3: Interfile benchmark: All files in the Linux Github repository are replaced by 4 random data and copied in varying degrees of order. Dynamic layout scores are predictive of recursive grep performance.
  • Figure 4: Git read-aging experimental results. On-disk layout as measured by dynamic layout score is generally predictive of read performance.
  • Figure 5: Average file size versus unaged grep costs (SSD). Lower is better. Each point on the git lines represents the average file size for the git experiment. For each point in the interfile microbenchmark, all files are set to that given size. The figure shows a clear relationship between average file size and grep cost. ext4 performs better on SSD with larger file sizes in both the git and interfile benchmarks.
  • ...and 7 more figures