STOW: A Spatially and Temporally Optimized Write Caching Algorithm

Non-volatile write-back caches enable storage controllers to provide quick write response times by hiding the latency of the disks. Managing a write cache well is critical to the performance of storage controllers. Over two decades, various algorithms have been proposed, including the most popular, LRW, CSCAN, and WOW. While LRW leverages temporal locality in the workload, and CSCAN creates spatial locality in the destages, WOW combines the benefits of both temporal and spatial localities in a unified ordering for destages. However, there remains an equally important aspect of write caching to be considered, namely, the rate of destages. For the best performance, it is important to destage at a steady rate while making sure that the write cache is not under-utilized or over-committed. Most algorithms have not seriously considered this problem, and as a consequence, forgo a significant portion of the performance gains that can be achieved. We propose a simple and adaptive algorithm, STOW, which not only exploits both spatial and temporal localities in a new order of destages, but also facilitates and controls the rate of destages effectively. Further, STOW partitions the write cache into a sequential queue and a random queue, and dynamically and continuously adapts their relative sizes. Treating the two kinds of writes separately provides for better destage rate control, resistance to one-time sequential requests polluting the cache, and a workload-responsive write caching policy. STOW represents a leap ahead of all previously proposed write cachemanagement algorithms. As anecdotal evidence, with a write cache of 32K pages, serving a 4+P RAID-5 array, using an SPC-1 Like Benchmark, STOW outperformsWOW by 70%, CSCAN by 96%, and LRW by 39%, in terms of measured throughput. STOW consistently providesmuch higher throughputs coupled with lower response times across a wide range of cache sizes, workloads, and experimental configurations.

[1]  Edward G. Coffman,et al.  Analysis of Scanning Policies for Reducing Disk Seek Times , 1972, SIAM J. Comput..

[2]  Quinn Jacobson,et al.  Destage Algorithms for Disk Arrays with Nonvolatile Caches , 1998, IEEE Trans. Computers.

[3]  Donald F. Towsley,et al.  Performance analysis of distributed file systems with non-volatile caches , 1993, [1993] Proceedings The 2nd International Symposium on High Performance Distributed Computing.

[4]  Song Jiang,et al.  LIRS: an efficient low inter-reference recency set replacement policy to improve buffer cache performance , 2002, SIGMETRICS '02.

[5]  Mary Baker,et al.  Non-volatile memory for fast, reliable file systems , 1992, ASPLOS V.

[6]  Nimrod Megiddo,et al.  ARC: A Self-Tuning, Low Overhead Replacement Cache , 2003, FAST.

[7]  Philip H. Seaman,et al.  On Teleprocessing System Design Part IV: An Analysis of Auxiliary Storage Activity , 1966, IBM Syst. J..

[8]  John Wilkes,et al.  Disk scheduling algorithms based on rotational position , 1991 .

[9]  SmithAlan Jay,et al.  I/O reference behavior of production database workloads and the TPC benchmarksan analysis at the logical level , 2001 .

[10]  Sang Lyul Min,et al.  On the existence of a spectrum of policies that subsumes the least recently used (LRU) and least frequently used (LFU) policies , 1999, SIGMETRICS '99.

[11]  Dharmendra S. Modha,et al.  WOW: wise ordering for writes - combining spatial and temporal locality in non-volatile caches , 2005, FAST'05.

[12]  Alan Jay Smith,et al.  I/O reference behavior of production database workloads and the TPC benchmarks—an analysis at the logical level , 1999, TODS.

[13]  Dharmendra S. Modha,et al.  CAR: Clock with Adaptive Replacement , 2004, FAST.

[14]  Darrell D. E. Long,et al.  Non-volatile cache management for improving write response time with rotating magnetic media , 2000 .

[15]  J. T. Robinson,et al.  Data cache management using frequency-based replacement , 1990, SIGMETRICS '90.

[16]  Peter J. Denning,et al.  Effects of scheduling on file memory operations , 1899, AFIPS '67 (Spring).

[17]  Yuanyuan Zhou,et al.  Second-level buffer cache management , 2004, IEEE Transactions on Parallel and Distributed Systems.

[18]  Alan Gilbert Merten,et al.  Some quantitative techniques for file organization , 1970 .

[19]  Robert Geist,et al.  Disk scheduling revisited: can O(n2) algorithms compete? , 1997, ACM-SE 35.

[20]  Robert Geist,et al.  A continuum of disk scheduling algorithms , 1987, TOCS.

[21]  Bruce McNutt,et al.  A Standard Test of I/O Cache , 2001, Int. CMG Conference.

[22]  Dharmendra S. Modha,et al.  SARC: Sequential Prefetching in Adaptive Replacement Cache , 2005, USENIX Annual Technical Conference, General Track.