Three-Page Index: OS-Accelerated Indexing
- The Three-Page Index is an indexing technique that leverages the OS virtual memory system to replace explicit pointer indirections with hardware-accelerated page-table lookups.
- It employs page-table shortcuts to transform pointer chasing into direct mappings, optimizing extendible hashing for faster lookups under low fan-in conditions.
- The approach balances reduced traversal height against initialization and TLB overhead, necessitating hybrid use with traditional indices and asynchronous maintenance.
Searching arXiv for the target paper and closely related OS/page-table work. “Three-Page Index” denotes an indexing technique that replaces explicit next-node pointers with page-table mappings, thereby using the operating system’s virtual memory index as a hardware-accelerated indirection structure. In the formulation introduced for database indexing, the method is not a new abstract index family but a way of turning an index pointer chase into a page-table lookup: instead of materializing indirections in pointer fields, the system expresses those indirections directly in the page table wherever possible, which is intended to reduce traversal height during lookups and exploit hardware acceleration already present in address translation (Schuhknecht, 2023).
1. Definition and conceptual basis
Index structures often materialize one or multiple levels of explicit indirections to enable traversal to target data. The central observation behind the Three-Page Index is that dereferencing a pointer is costly because, in addition to following the address, it involves two address translations from virtual memory to physical memory under the hood. In the worst case, address translation itself is resolved by an index access, namely a lookup into the page table, characterized as a central hardware-accelerated index structure of the operating system (Schuhknecht, 2023).
The method therefore asks whether the page table, if it is already constantly queried, can be incorporated directly into a database index. The answer proposed in the paper is to express indirections directly in the page table wherever possible. This has two stated effects: it effectively reduces the height of traversal during lookups, and it exploits the hardware-acceleration of lookups in the page table (Schuhknecht, 2023).
The label “Three-Page Index” is tied to the memory layout used in the motivating example: an inner node page, shortcut page(s), and leaf page(s) mediated by the page table. The crucial point is that the index is partly embodied by the operating system’s virtual memory index rather than by explicit application-level pointer fields. The design principle is summarized in the paper’s wording that “one level of indirection should be sufficient” (Schuhknecht, 2023).
2. Indirection elimination via page-table shortcuts
The paper formalizes the page table as a coarse-granular radix tree that maps virtual to physical memory at page granularity. On that basis, it introduces “shortcuts,” meaning page-table mappings that encode the relationship that would otherwise be represented by explicit pointers (Schuhknecht, 2023).
The motivating example is a radix-style inner node with four slots. In a traditional representation, the slots hold pointers to leaf nodes. A lookup for key 6 (0110) requires three indirections: one implicit indirection for the inner node, one explicit indirection for the pointer, and one implicit indirection for the leaf. In the shortcut version, the inner node is represented only in virtual memory, while the leaf nodes reside in physical memory from a controlled pool. The slot-to-child relation is materialized by mapping each virtual page of a shortcut area directly to the physical page of the corresponding leaf node. The slot-to-child relation thus becomes a page-table relation rather than a pointer chain (Schuhknecht, 2023).
This mechanism relies on page-sized nodes and a radix-style access pattern. A plausible implication is that the approach is best suited to index structures whose navigation already aligns naturally with page-granular addressing, because the page table only maps at page granularity. The paper itself showcases the technique using extendible hashing rather than claiming a universal replacement for all index representations (Schuhknecht, 2023).
3. Construction and memory-rewiring implementation
The implementation uses memory rewiring and a self-managed physical page pool backed by a main-memory file created with memfd_create() and resized with ftruncate(). A linear virtual mapping v_pool to the pool’s physical pages is used to recover the physical page corresponding to a leaf. Given a pointer to a leaf node, the system first obtains the leaf’s virtual page v_leaf, then computes
and uses that offset to map the shortcut page to the proper pool page (Schuhknecht, 2023).
The remapping itself is performed with:
1 2 3 4 5 |
mmap(&shortcut[i],
pagesize,
PROT_READ | PROT_WRITE,
MAP_SHARED | MAP_FIXED,
p_pool, offset_leaf); |
The construction procedure is described in two steps. First, the system reserves a consecutive virtual region of size k * pagesize with mmap() using MAP_PRIVATE | MAP_ANON; this creates the shortcut region as anonymous virtual memory. Second, for each slot i, it remaps the corresponding virtual page shortcut[i] to the physical page of the pointed-to leaf using the offset into p_pool. If neighboring shortcut pages correspond to neighboring physical pages, the mappings can be established in a single mmap() call. Updates are handled by repeating this remapping for each modified slot (Schuhknecht, 2023).
These implementation details make clear that the technique depends on user-space control over virtual-memory mappings via memfd_create, ftruncate, mmap, and MAP_FIXED, and on a system where page-table translations and TLBs behave as on the tested x86-64 Linux setup (Schuhknecht, 2023).
4. Performance model and systems trade-offs
The paper presents the shortcut technique as a trade-off rather than an unconditional optimization. The principal benefit is fewer explicit traversal steps during lookup. The principal costs are remapping overhead, TLB pressure, shootdown overhead, and maintenance complexity (Schuhknecht, 2023).
Creation is explicitly expensive. In a benchmark with an inner node of slots, allocating the shortcut region is described as basically free because it only reserves virtual memory, but establishing the indirections through mmap() costs about 447.5 μs per page in the lazy shortcut variant, compared with 2.1 μs per page for the traditional pointer-based setup. The paper therefore states that shortcut initialization is “two orders of magnitude more costly” and must be hidden (Schuhknecht, 2023).
Eager population of the page table before access mitigates first-touch cost: the first access becomes about 3x cheaper, while later accesses converge to similar performance regardless of whether the page table was eagerly or lazily populated. This motivates asynchronous creation, maintenance, and population of shortcuts relative to the main index modifications (Schuhknecht, 2023).
A second major trade-off is TLB behavior. Because the shortcut transforms slot access into page access, the active memory footprint expands from a pointer array of k * 8B plus leaf pages in the traditional layout to a k-page virtual region in the shortcut layout. The experiments show that, for high fan-in, TLB misses and page-table overhead can outweigh the reduction in explicit indirections. The paper states that “for fan-ins of more than 16, the traditional variant performs better,” whereas for lower fan-ins the shortcut variant wins. Accordingly, shortcuts should be used primarily under low fan-in, should not entirely replace the traditional representation, and should coexist with it so that the system can choose the best access path dynamically (Schuhknecht, 2023).
The behavior of translation hardware is therefore central to the method. Related work on page-size management emphasizes that address-translation overhead can dominate performance in large-memory workloads and that x86-64 systems expose a hierarchy of page sizes whose software exploitation is nontrivial (Ram et al., 2020). In the Three-Page Index setting, this broader systems context suggests that the technique derives its benefit only when the reduction in pointer-chasing costs exceeds the additional translation-side costs.
5. Concurrency, TLB shootdowns, and maintenance policy
In multithreaded settings, mmap()-based remapping invalidates translation entries, forcing the operating system to send IPIs to flush stale TLB entries on all cores. The paper shows that remapping cost increases with concurrent readers and concludes that “TLB-shootdowns slow down the thread that is performing the remapping” (Schuhknecht, 2023).
This behavior directly shapes the maintenance policy. Rather than updating shortcuts on the critical path, the proposed solution is to hide the maintenance cost in a background thread. The shortcut representation is thus explicitly asynchronous: the main index remains correct and updatable in its conventional form, while the shortcut structure is maintained as an auxiliary acceleration path (Schuhknecht, 2023).
This separation between correctness-critical state and recovery or acceleration metadata has an analogue in database systems work on auxiliary page-level metadata structures. For example, the page recovery index proposed for single-page failure recovery is also maintained transactionally but designed so that it does not dominate the critical path of normal execution (Graefe et al., 2012). In the present context, the comparison is only structural: the Three-Page Index uses asynchronous maintenance to preserve lookup acceleration without making remapping latency part of ordinary modification latency.
6. Extendible hashing as the concrete database realization
The paper uses extendible hashing as the principal application because it has a wide inner node, the directory, which indexes fixed-size hash buckets, and the directory indirection is its main weakness. In classical extendible hashing, the directory is indexed by the high-order bits of the hash, and the directory doubles when a bucket split requires more slots. The standard terminology of local depth and global depth is used: local depth is how many hash bits determine a bucket, and global depth is the number of bits used by the directory (Schuhknecht, 2023).
Shortcut-EH retains the traditional directory for correctness and maintenance, but builds a shortcut directory asynchronously. All directory-modifying operations are replayed into the shortcut directory through a concurrent lock-free FIFO queue. Two maintenance cases are distinguished. For a bucket split, the main thread pushes two update requests, each containing the slot to update and the file offset of the target bucket. For a directory doubling, it pushes a create request containing the new directory size and a vector of file offsets. A separate mapper thread polls the queue every 25 ms, executes the requests, and then populates the corresponding page table entries before marking the shortcut directory in sync (Schuhknecht, 2023).
Both the traditional and shortcut directories carry version numbers. The shortcut version is advanced only after population, so no access suffers a page fault. Lookup routing depends on synchronization state and average fan-in. The paper states that if the average fan-in is ≤ 8, accesses are routed through the shortcut; otherwise they use the traditional directory to avoid TLB thrashing (Schuhknecht, 2023).
In lookup experiments, Shortcut-EH is significantly faster than classical extendible hashing and comes close to a single hash table. The remaining overhead is attributed to computing two hashes—one for the directory slot and one for the bucket slot—and to checking whether the directories are synchronized. In insertion experiments, Shortcut-EH and classical extendible hashing both distribute resizing cost over time, while Shortcut-EH incurs only around 8% overhead over extendible hashing for maintenance. Under a mixed workload, when insertions temporarily desynchronize the shortcut directory, lookups briefly fall back to the traditional directory and performance degrades; once synchronization catches up, Shortcut-EH again outperforms classical extendible hashing (Schuhknecht, 2023).
7. Scope, assumptions, and significance
The Three-Page Index should not be understood as a general-purpose replacement for explicit pointers. The paper is explicit that shortcuts should be used under low fan-in and should coexist with traditional representations rather than replace them completely (Schuhknecht, 2023). This suggests a hybrid indexing regime in which the shortcut representation is a selective acceleration layer.
Its assumptions are correspondingly narrow. The method assumes page-sized nodes, a radix-style access pattern, the ability to manipulate memory mappings from user space, and an execution environment matching the tested x86-64 Linux setup. It also assumes that page-table lookup and TLB behavior are favorable enough that turning an explicit pointer chase into a page-table lookup yields a net gain (Schuhknecht, 2023).
Within those assumptions, the contribution is conceptually distinctive. Database index structures ordinarily treat the operating system’s virtual-memory subsystem as an external cost center. The Three-Page Index instead treats the page table as a usable index structure in its own right: a coarse-granular radix tree already accelerated by the hardware memory-management pipeline. Its significance lies in making that latent structure explicit in database-system design and in showing, through extendible hashing, that page-table-mediated shortcuts can improve lookup performance when carefully constrained by fan-in, TLB behavior, and asynchronous maintenance policy (Schuhknecht, 2023).