Skip to main content
QUICK REVIEW

[Paper Review] Wormhole: A Fast Ordered Index for In-memory Data Management

Xingbo Wu, Fan Ni|arXiv (Cornell University)|May 6, 2018
Distributed systems and fault toleranceComputer Science31 references63 citations
TL;DR

Wormhole combines hash tables, a prefix tree, and a B+ tree-like structure to achieve O(log L) lookup time (L = key length) for an ordered index in in-memory data management, with competitive space and fast range queries.

ABSTRACT

In-memory data management systems, such as key-value stores, have become an essential infrastructure in today's big-data processing and cloud computing. They rely on efficient index structures to access data. While unordered indexes, such as hash tables, can perform point search with O(1) time, they cannot be used in many scenarios where range queries must be supported. Many ordered indexes, such as B+ tree and skip list, have a O(log N) lookup cost, where N is number of keys in an index. For an ordered index hosting billions of keys, it may take more than 30 key-comparisons in a lookup, which is an order of magnitude more expensive than that on a hash table. With availability of large memory and fast network in today's data centers, this O(log N) time is taking a heavy toll on applications that rely on ordered indexes. In this paper we introduce a new ordered index structure, named Wormhole, that takes O(log L) worst-case time for looking up a key with a length of L. The low cost is achieved by simultaneously leveraging strengths of three indexing structures, namely hash table, prefix tree, and B+ tree, to orchestrate a single fast ordered index. Wormhole's range operations can be performed by a linear scan of a list after an initial lookup. This improvement of access efficiency does not come at a price of compromised space efficiency. Instead, Wormhole's index space is comparable to those of B+ tree and skip list. Experiment results show that Wormhole outperforms skip list, B+ tree, ART, and Masstree by up to 8.4x, 4.9x, 4.3x, and 6.6x in terms of key lookup throughput, respectively.

Motivation & Objective

  • Motivate the need for fast ordered indexes in in-memory KV stores where traditional O(log N) lookups become costly at large scale.
  • Propose a hybrid data structure that reduces lookup time from O(log N) toward O(log L) without increasing space usage significantly.
  • Enable efficient range queries and maintain performance for insertions and deletions in large in-memory indices.
  • Assess Wormhole against existing indexes (B+ tree, skip list, ART, Masstree) and analyze concurrency and space characteristics.

Proposed method

  • Introduce Wormhole by replacing the B+ tree MetaTree with a MetaTrie to decouple lookup cost from N (number of keys).
  • Replace MetaTrie with a hash-enabled MetaTrieHT to achieve O(log L) lookup via longest-prefix matching accelerated by a hash-based prefix table.
  • Store multiple keys per leaf node to improve space efficiency compared to a standard trie.
  • Use a two-phase search: (1) longest-prefix match via MetaTrieHT, (2) subtree walk using internal node bitmaps and leaf pointers for fast navigation.
  • Incorporate incremental hashing and a lock-free reader path (RCU) for MetaTrieHT to support concurrent lookups without blocking.
  • Provide algorithms for GET, SET, DEL, and RangeSearchAscending, and describe splitting/merging of leaves and anchor maintenance in MetaTrieHT.

Experimental results

Research questions

  • RQ1Can Wormhole achieve lookup costs of O(log L) independent of N while maintaining space efficiency comparable to B+ trees?
  • RQ2How can a hybrid structure (hash + trie + B+ tree concepts) support efficient point and range queries in large in-memory indexes?
  • RQ3What concurrency strategies enable fast lookups with minimal locking while supporting insertions, deletions, and structural modifications?
  • RQ4How does Wormhole compare to existing ordered indexes and to hash tables in terms of throughput and space?
  • RQ5What optimizations further reduce the lookup path costs and improve practical performance?

Key findings

  • Wormhole achieves an asymptotic lookup time of O(log L), where L is the search key length, which is lower than O(log N) for large N.
  • Wormhole’s core structure combines a LeafList (like a B+ tree leaves) with a MetaTrieHT that accelerates longest-prefix matches and reduces traversal costs.
  • Experimental results show Wormhole outperforms Skip List, B+ Tree, ART, and Masstree by up to 8.4×, 4.9×, 4.3×, and 6.6× in key lookup throughput, respectively.
  • When compared to a highly optimized Cuckoo hash table for point-lookup scenarios without range queries, Wormhole achieves 30–92% of the hash-table throughput.
  • The space overhead of Wormhole is comparable to B+ tree and typically lower than a plain trie, due to storing multiple keys per leaf and anchoring efficiency.
  • Concurrency is supported with reader-writer locks at the leaf level and a lock-protected MetaTrieHT with RCU-based lock-free readers, reducing contention during lookups while enabling safe updates.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.