Skip to main content
QUICK REVIEW

[Paper Review] Wear Minimization for Cuckoo Hashing: How Not to Throw a Lot of Eggs into One Basket

David Eppstein, Michael T. Goodrich|arXiv (Cornell University)|Apr 1, 2014
Advanced Image and Video Retrieval TechniquesComputer Science23 references6 citations
TL;DR

This paper proposes a wear-minimizing variant of cuckoo hashing that uses d > 2 hash functions and selects insertion locations based on real-time cell wear counts. It proves that with high probability, the maximum wear per cell is bounded by log log n + O(1) after n insertions into a table of size Cn, significantly outperforming standard cuckoo hashing and linear probing in practice, especially under high load and mixed workloads with deletions.

ABSTRACT

We study wear-leveling techniques for cuckoo hashing, showing that it is possible to achieve a memory wear bound of $\log\log n+O(1)$ after the insertion of $n$ items into a table of size $Cn$ for a suitable constant $C$ using cuckoo hashing. Moreover, we study our cuckoo hashing method empirically, showing that it significantly improves on the memory wear performance for classic cuckoo hashing and linear probing in practice.

Motivation & Objective

  • To address the high memory wear in standard cuckoo hashing, especially under modern persistent memory constraints.
  • To design a practical variant of cuckoo hashing that provably limits maximum cell wear to log log n + O(1) with high probability.
  • To empirically evaluate and compare wear performance against standard cuckoo hashing and linear probing under mixed insertion-deletion workloads.
  • To provide a theoretically grounded, practical solution for wear leveling in hash tables used in flash and phase-change memory systems.

Proposed method

  • Extends standard cuckoo hashing by using d > 2 random hash functions per key instead of just two.
  • At insertion time, selects the cell among the d candidates with the lowest current wear count to minimize wear amplification.
  • Maintains a wear counter for each cell and updates it on every write operation.
  • Uses a theoretical analysis based on the power of two choices, extended to d choices, to bound the maximum load (wear) to log log n + O(1).
  • Employs cryptographic hash functions (from mhash library) in experiments to ensure randomness and avoid bias.
  • Implements a hybrid deletion strategy: for linear probing, reinserts items after deletion to maintain probe sequences, counting wear only on actual physical writes.

Experimental results

Research questions

  • RQ1Can a variant of cuckoo hashing be designed to achieve a maximum wear bound of log log n + O(1) with high probability?
  • RQ2How does wear-aware cell selection using d > 2 hash functions compare to standard cuckoo hashing and linear probing in terms of wear performance under mixed workloads?
  • RQ3Does the proposed method maintain low wear under high load factors (e.g., 4/5 fill ratio) and repeated insertions and deletions?
  • RQ4Can the theoretical wear bound be observed in practice, especially when deletions are involved?

Key findings

  • The proposed wear-aware cuckoo hashing achieves a maximum wear bound of log log n + O(1) with high probability after n insertions into a table of size Cn, significantly improving on the Ω(log n / log log n) bound of standard cuckoo hashing.
  • In experiments with 1 billion operation pairs (insert/delete), the maximum wear for the proposed method was 171.93 at a 4/5 fill ratio, compared to 281.84 for standard cuckoo hashing.
  • At a 4/5 fill ratio, the proposed method reduced maximum wear by approximately 39% compared to standard cuckoo hashing and by 42% compared to linear probing.
  • Even at low fill ratios (1/6), the proposed method achieved lower maximum wear (33.92) than standard cuckoo hashing (40.52), demonstrating consistent improvement.
  • The average wear across all cells was lower for the proposed method at all tested fill ratios, indicating reduced overall wear.
  • The method remains effective even when insertions are interleaved with deletions, maintaining low wear despite dynamic 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.