User-Controlled File Caching in Linux

Alaa R. Alameldeen and David A. Schneider

Abstract:

The Unix file system and its many versions have been successful so far in providing a powerful yet simple interface to the file system calls. The performance of the file system is greatly affected by its caching behavior. However, UNIX does not allow users to have any control of its caching policies. This means that useful information that a user application might know about, such as its file cache requirements, is ignored, and users cannot optimize cache behavior according to their needs.

In this paper, we studied the design of file caching for a Unix sibling, Linux. We designed and implemented a user-controllable file cache for Linux. The user is enabled to control the Linux file cache by providing a per-file limit on the page cache consumption, as well as a per-file page replacement policy. This allows applications to control their file system performance, and we believe that trusted user applications should be able to make use of new features for their advantage. Experiments were conducted using micro-benchmarks that show the performance of this modified file cache system. It was shown that user-applications can perform much better in certain situations if they were able to control their file cache behavior.

Available as: Postscript

Linux kernel modifications are available here These compressed file contains source code for all files that were modified. Modifications in the source files are marked with: /*******************NEW************************/ comments before and after each modified part.

The kernel image is avaiable here

Benchmarks we used for testing are available here: Benchmark 1 , Benchmark 2 , Benchmark 3

Some performance results are given here and here !


Copyright 2000, Alaa Alameldeen and David Schneider