arXiv:2610.33770cs.DBOct 2026

Manuscript Offprint

arXiv:2610.33770

Synchronized Rebuilds:The Hidden Cost of Concurrent Inserts in Learned Indexes

Emmilly Immaculate Namuganga, Laurent Bindschaedler

Abstract

Nine years after learned indexes were proposed, their advantage on read-mostly data is well established, and a standard benchmark rates their best concurrent version as almost ready for use. Across more than 4000 runs of 13 indexes, we find that each design pays for concurrent inserts in a different way. Gapped-array indexes rebuild their nodes in synchronized bursts, at positions that follow from three constants in the source. Model-placement indexes use three to four times the memory, buffered indexes take two to three times as long. Three of five concurrent learned indexes lost keys or stopped making progress. Standard benchmarks miss both the bursts and the lost keys. The bursts cost far more than in B-trees because each rebuild copies a node a thousand times larger than a page and, under concurrency, blocks every operation that reaches the node. The typical B-tree fix of randomizing node density only spreads the bursts out, while smaller nodes trade them for longer run times at scale. Two standard systems techniques remove them: a buffer that exists only while a node is rebuilt, and background rebuilds. We show that on 400M real keys, these techniques reduce the number of inserts whose latency exceeds 100 μ\mus by two orders of magnitude at one thread, and by one at sixteen when spare cores run the background threads, at a third to half the run time of the buffered designs.

1 Introduction

Learned indexes replace the comparisons in a search tree with models that predict where a key is stored [11]. Nine years after they were proposed, their advantage on read-mostly data is well established: over keys a model fits well, they match a B-tree's lookup latency in much less memory. Updatable versions absorb inserts by leaving free slots in their data nodes, by placing keys at predicted slots, or by buffering new keys. GRE finds the concurrent version of ALEX almost ready [33], while Sun et al. find learned indexes behind classical ones under concurrency [28].

We measure where these indexes stand once they must absorb inserts concurrently and at scale. We benchmarked 13 index implementations, 9 of them learned, in more than 4000 runs on five real datasets and two synthetic ones of up to 800M keys, with 1 to 32 threads and workloads ranging from

Laurent Bindschaedler

MPI-SWS

Saarbrücken, Germany

bindsch@mpi-sws.org

read-heavy to insert-only. We find that under concurrent inserts the cost comes from how these indexes restructure. Each design pays for inserts somewhere the standard benchmarks do not look. Gapped-array indexes rebuild their nodes in synchronized bursts. Model-placement indexes avoid the bursts but use three to four times the memory, while buffered indexes avoid them at two to three times the run time. Under stress, three of the five concurrent learned indexes we ran lost keys or stopped making progress, two of them with our substitute for a proprietary math routine. Standard benchmarks miss these losses because they never check afterward that the inserted keys are still there.

We examine the bursts in most depth, because they show most directly how restructuring becomes insert latency. A gapped-array index rebuilds a data node into a larger one once the fraction of its slots in use, its density, crosses a threshold. Bulk loading, which is how these indexes are built, gives every node the same density. As Figure 1a shows, the nodes then reach the threshold together, at points in the insert stream that three constants in the index's source predict. B-trees show the same effect, known as waves of misery [8]. In learned indexes it costs far more, both in insert latency and in run time, because a rebuild copies tens of thousands of entries where a B-tree split copies a page of tens. Under concurrency, it also locks its node, so every other insert and lookup that reaches the node restarts, as Figure 1b shows. More than 93% of all restarts come from rebuilds. Existing benchmarks miss the bursts because a percentile over a large batch cannot see a few thousand operations with high latency among millions. The known fixes trade one cost for another. The typical B-tree fix of randomizing each node's initial density spreads the rebuilds out but adds restarts under concurrency. At scale, smaller nodes lengthen runs and raise median lookup latency.

Two standard systems techniques, applied only where they are needed, remove most of the cost. Since a rebuild only reads the old node, inserts that reach it go to a small buffer that the rebuild merges into the new node, while lookups read the old node and the buffer. In addition, an insert that brings a node close to the threshold hands the rebuild to a background thread instead of performing it. Neither technique is new. Online index builds have long logged concurrent updates in a side file [25], while LSM trees and

(a) data-node density

Figure

(b) ALEX-OL

Figure

side buffer + background

Figure 1. (a) Bulk loading fills every data node to the same density, so the nodes reach the expansion threshold together and rebuild in a burst. (b) In ALEX-OL a rebuild locks its node, and every insert and lookup that reaches it restarts until the rebuild ends. With the side buffer, inserts go to the buffer and lookups read the old node and the buffer, while a background thread builds the new node from both.

XIndex restructure in background threads [26, 29]. Unlike buffered learned indexes, which keep new keys outside the learned structure until they are merged, our buffer exists only while a node is rebuilt, so the index otherwise keeps its lookup path and memory.

We apply both techniques to ALEX-OL, the concurrent gapped-array index of the GRE benchmark, which calls it ALEX+ [33], and measure it on 400M keys from the SOSD benchmark [10]. There, the bursts carry 89% of all inserts whose latency exceeds 100 μ\mus, which we call high-latency inserts. The two techniques remove nearly all of them with one thread, and most of them with sixteen when spare cores run the background threads, while median lookup latency rises by 6–10%. On a second dataset, where the rebuilds are already spread out, the reduction is smaller. A permanent buffer in ALEX-OL itself makes the run about 17 times longer at sixteen threads.

The lesson is that the insert tail of a concurrent learned index is largely a systems problem. A recent robustness study attributes the instability of these indexes to overfitted models, unbalanced structures, ineffective adjustments, and excessive space reservation [21]. We locate the cost of concurrent inserts in synchronized restructuring and blocking, which existing benchmarks cannot see. The proper remedies are ones that concurrent data structures have long used.

We make the following contributions:

  • We present a systems account of updatable learned indexes under concurrent inserts, on one common workload that checks every key: where each design pays for inserts, how that changes as the index grows, and why the standard benchmarks do not see it.

  • We diagnose the most instructive case, in which bulk loading synchronizes rebuilds at positions that three source constants predict. We confirm the prediction by changing the constants, show that batch percentiles hide the bursts, and trace their cost to operations restarting on a locked node.

  • We show that two standard techniques, applied only during a rebuild, remove most of this cost, which confirms the diagnosis. From this we draw lessons for index designers and benchmark authors.

  • We release the artifacts behind every number: a benchmark driver that checks every key, patches that fix defects in released ALEX-OL, the run scripts, and the results of all runs, at https://github.com/mpi-dsg/GRE_Longitudinal/tree/wave-benchmark/wave-benchmark.

Paper roadmap. Section 2 describes how learned indexes absorb inserts and what is known about waves of misery. Section 3 derives the burst positions, Section 4 shows why percentiles over large batches cannot measure them, and Section 5 locates their cost and applies the two techniques. Section 6 evaluates the designs, the bursts, the mitigations, and the techniques. Section 7 draws lessons and states limitations. Section 8 discusses related work.

References (27)