Why does file system prefetching work?

Most file systems attempt to predict which disk blocks will be needed in the near future and prefetch them into memory; this technique can improve application throughput as much as 50%. But why? The reasons include that the disk cache comes into play, the device driver amortizes the fixed cost of an I/O operation over a larger amount of data, total disk seek time can be decreased, and that programs can overlap computation and I/O. However, intuition does not tell us the relative benefit of each of these causes, or techniques for increasing the effectiveness of prefetching. To answer these questions, we constructed an analytic performance model for file system reads. The model is based on a 4.4BSD-derived file system, and parameterized by the access patterns of the files, layout of files on disk, and the design characteristics of the file system and of the underlying disk. We then validated the model against several simple workloads; the predictions of our model were typically within 4% of measured values, and differed at most by 9% from measured values. Using the model and experiments, we explain why and when prefetching works, and make proposals for how to tune file system and disk parameters to improve overall system throughput.

[1]  Anna R. Karlin,et al.  Near-optimal parallel prefetching and caching , 1996, Proceedings of 37th Conference on Foundations of Computer Science.

[2]  Jim Zelenka,et al.  Informed prefetching and caching , 1995, SOSP.

[3]  A. Lewis Bastian Cached DASD Performance Prediction and Validation , 1982, Int. CMG Conference.

[4]  A. Retrospective,et al.  The UNIX Time-sharing System , 1977 .

[5]  Hui Lei,et al.  An analytical approach to file prefetching , 1997 .

[6]  Samuel J. Leffler,et al.  The design and implementation of the 4.3 BSD Unix operating system , 1991, Addison-Wesley series in computer science.

[7]  Christopher Small,et al.  Building an extensible operating system , 1998 .

[8]  Yale N. Patt,et al.  Scheduling algorithms for modern disk drives , 1994, SIGMETRICS 1994.

[9]  Jim Griffioen,et al.  Reducing File System Latency using a Predictive Approach , 1994, USENIX Summer.

[10]  David Kotz Disk-directed I/O for an out-of-core computation , 1995, Proceedings of the Fourth IEEE International Symposium on High Performance Distributed Computing.

[11]  Bernhard Seeger,et al.  An Analysis of Schedules for Performing Multi-Page Requests , 1996, Inf. Syst..

[12]  Arif Merchant,et al.  An analytic behavior model for disk drives with readahead caches and request reordering , 1998, SIGMETRICS '98/PERFORMANCE '98.

[13]  Spencer W. Ng,et al.  Improving Disk Performance Via Latency Reduction , 1991, IEEE Trans. Computers.

[14]  Andy Hospodor Mechanical Access Time Calculation , 1995 .

[15]  Elizabeth Shriver Performance modeling for realistic storage devices , 1997 .

[16]  John Wilkes,et al.  An introduction to disk drive modeling , 1994, Computer.

[17]  Kai Li,et al.  Implementation and performance of application-controlled file caching , 1994, OSDI '94.

[18]  Neil C. Wilhelm A General Model for the Performance of Disk Systems , 1977, J. ACM.

[19]  William H. Sanders,et al.  Performance analysis of the RAID 5 disk array , 1995, Proceedings of 1995 IEEE International Computer Performance and Dependability Symposium.

[20]  A. Rossier Letter to the Editor , 1986, Paraplegia.

[21]  Daniel A. Reed,et al.  Input/output access pattern classification using hidden Markov models , 1997, IOPADS '97.

[22]  T.M. Madhyastha,et al.  Exploiting Global Input Output Access Pattern Classification , 1997, ACM/IEEE SC 1997 Conference (SC'97).

[23]  Robert S. Fabry,et al.  A fast file system for UNIX , 1984, TOCS.

[24]  Mary Baker,et al.  Measurements of a distributed file system , 1991, SOSP '91.

[25]  Micha Hofri Disk scheduling: FCFS vs.SSTF revisited , 1980, CACM.

[26]  Jeffrey Scott Vitter,et al.  Modeling and optimizing I/O throughput of multiple disks on a bus , 1999, SIGMETRICS '99.

[27]  Margo I. Seltzer,et al.  Disk Scheduling Revisited , 1990 .

[28]  Todd C. Mowry,et al.  Automatic compiler-inserted I/O prefetching for out-of-core applications , 1996, OSDI '96.

[29]  Philip S. Yu,et al.  Analytic Modeling of Clustered RAID with Mapping Based on Nearly Random Permutation , 1996, IEEE Trans. Computers.

[30]  Anna R. Karlin,et al.  A study of integrated prefetching and caching strategies , 1995, SIGMETRICS '95/PERFORMANCE '95.

[31]  Donald F. Towsley,et al.  The Design and Evaluation of RAID 5 and Parity Striping Disk Array Architectures , 1993, J. Parallel Distributed Comput..

[32]  E. I. Organick,et al.  The Multics Input/Output system , 1971, SOSP '71.

[33]  Randy H. Katz,et al.  Input/output behavior of supercomputing applications , 1991, Proceedings of the 1991 ACM/IEEE Conference on Supercomputing (Supercomputing '91).

[34]  Keith Bostic,et al.  The design and implementa-tion of the 4.4BSD operating system , 1996 .