Concurrency-friendly Caching for Append-only Data Structures

Append-only disk-based data structures disobey the traditional rules of temporal and physical locality relied upon by caching algorithms. Temporal locality becomes a function of physical oset, as the newest data blocks are always closest to the end. We have extended the well-known ring buer, which is typically used as a large queue for delaying and batching writes, and is used in the Linux kernel’s logging infrastructure, as well as in the writeahead log for many lesystems and databases based on ARIES [5]. Our extension allows it to perform as both a tunable write-behind cache, and a highperformance read cache. The addition of this cache to the RethinkDB MySQL storage engine [1] consistently increases write throughput by 2x.