[Paper Review] Learned Indexes for a Google-scale Disk-based Database
This paper presents the first integration of learned indexes into a production-scale, distributed, disk-based database—Google's Bigtable—demonstrating significant performance improvements. By adapting learned indexes to predict block locations instead of in-memory offsets, the authors reduce index size, minimize disk I/O, and improve end-to-end read latency and throughput by up to 38% for point lookups and 56% for scans, primarily through secondary effects like reduced block reads and better compression.
There is great excitement about learned index structures, but understandable skepticism about the practicality of a new method uprooting decades of research on B-Trees. In this paper, we work to remove some of that uncertainty by demonstrating how a learned index can be integrated in a distributed, disk-based database system: Google's Bigtable. We detail several design decisions we made to integrate learned indexes in Bigtable. Our results show that integrating learned index significantly improves the end-to-end read latency and throughput for Bigtable.
Motivation & Objective
- To evaluate the practicality of learned indexes in real-world, disk-based, distributed databases like Bigtable.
- To address skepticism about learned indexes by demonstrating measurable performance gains in a production system with high-scale, real workloads.
- To overcome the limitations of prior learned index designs—particularly their incompatibility with disk-based systems and lack of support for block-level storage—by redesigning the model to predict block locations.
- To evaluate the impact of learned indexes on both point lookups and range scans, focusing on latency, throughput, and resource efficiency.
- To show that the benefits of learned indexes extend beyond faster lookups to include reduced I/O, better caching, and lower CPU usage due to smaller index size and fewer decompression operations.
Proposed method
- Adapt the original learned index model to predict block numbers instead of in-memory offsets, enabling compatibility with Bigtable’s block-based storage architecture.
- Use a character-wise base conversion technique to encode string keys into integers, where each character position uses a base proportional to its observed range (min/max ASCII values), ensuring monotonicity and efficient OLS model training.
- Train an Ordinary Least Squares (OLS) model on the encoded keys to predict the cumulative distribution function (CDF) of block locations, enabling fast point lookup via interpolation.
- Construct a compressible block mapping table B that stores disk locations for predicted block ranges, enabling efficient random access and reducing storage overhead by eliminating key storage.
- Integrate the learned index into Bigtable’s existing SSTable and tablet server architecture, decoupling model training from the write path to avoid performance impact on writes.
- Leverage the smaller index size to reduce the number of index block reads, improve cache efficiency, and reduce decompression overhead during data retrieval.
Experimental results
Research questions
- RQ1Can learned indexes provide measurable performance improvements in a real-world, disk-based, distributed database system like Bigtable?
- RQ2How does the integration of learned indexes affect end-to-end read latency and throughput for both point lookups and range scans?
- RQ3What architectural modifications are required to adapt a learned index—originally designed for in-memory arrays—to a block-based, disk-stored system?
- RQ4To what extent do secondary effects (e.g., reduced I/O, better compression, improved caching) contribute to performance gains beyond faster lookup speed?
- RQ5Does the use of learned indexes impact write performance, and can model training be decoupled from the write path to maintain system throughput?
Key findings
- The learned index reduced point lookup latency by 38% in the 99th percentile and 36% on average, with similar improvements for scans.
- Throughput increased by 54% in the 99th percentile and 55% on average for point lookups, and by 56% in the 99th percentile and 28% on average for scans.
- The performance gains were primarily due to reduced I/O—fewer index blocks accessed—leading to lower decompression overhead and better cache utilization.
- The index size was significantly reduced, enabling fewer disk reads even with cold caches, which improved tail latency substantially.
- The model training was decoupled from the write path, so write performance remained unaffected, maintaining production system stability.
- The approach generalized across different key distributions and value sizes, with consistent performance improvements observed in ongoing experiments.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.