On the design of a new Linux readahead framework

  • Authors:
  • WU Fengguang;XI Hongsheng;XU Chenfeng

  • Affiliations:
  • University of Science and Technology of China, Hefei;University of Science and Technology of China, Hefei;University of Science and Technology of China, Hefei

  • Venue:
  • ACM SIGOPS Operating Systems Review - Research and developments in the Linux kernel
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

As Linux runs an increasing variety of workloads, its in-kernel readahead algorithm has been challenged by many unexpected and subtle problems. To name a few: readahead thrashings arise when readahead pages are evicted prematurely under memory pressure; readahead attempts on already cached pages are undesirable; interrupted-then-retried reads and locally disordered NFS reads that can easily fool the sequential detection logic. In this paper, we present a new Linux readahead framework with flexible and robust heuristics that can cover varied sequential I/O patterns. It also enjoys great simplicity by handling most abnormal cases in an implicit way. We demonstrate its advantages by a host of case studies. Network throughput is 3 times better in the case of thrashing and 1.8 times better for large NFS files. On serving large files with lighttpd, the disk utilization is decreased by 26% while providing 17% more network throughput.