Cuckoo Hashing Affinity Table Lookup Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing hash table implementations, such as Cuckoo hashing, face inefficiencies in lookup performance due to the need to access multiple hash tables simultaneously, leading to suboptimal throughput in key-value databases and packet processing applications.

Innovation Solution

The introduction of an affinity table that selects the most likely hash table to store a key, reducing the average number of hash tables searched per key lookup by using an affinity function to determine the initial hash table for search, and dynamically updating the affinity table based on key access patterns to optimize performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If multiple hash tables are accessed simultaneously in traditional Cuckoo hashing, then key lookup can be performed, but lookup performance and throughput are reduced due to the need to access multiple tables

Engineering Contradiction:
Improvelookup throughputVSAvoidnumber of hash table accesses per lookup
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The affinity table pre-computes and stores the most likely hash table location for each key before the actual lookup operation. When a lookup is performed, the system first queries the affinity table to get the predicted hash table index, then only accesses that specific hash table. This preliminary action eliminates the need to simultaneously access multiple hash tables, directly improving lookup throughput and reducing access time.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If an affinity table is introduced to select the most likely hash table, then lookup performance improves, but device complexity increases due to the additional data structure

Engineering Contradiction:
Improvelookup throughputVSAvoidhashing structure complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The affinity table stores pre-computed index values that change based on the key's hash function output. By transforming the key through the affinity function and storing the resulting index, the system converts a complex multi-table search problem into a simple table lookup followed by a single hash table access. This parameter transformation approach improves throughput while keeping the additional complexity manageable.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11782895B2Cuckoo hashing including accessing hash tables using affinity table
Publication Date: 2023.10.10 MELLANOX TECHNOLOGIES LTD(IL)
  • US11782895B2 patent drawing
  • US11782895B2 patent drawing
  • US11782895B2 patent drawing

AI summary

A hashing apparatus includes a memory and circuitry. The memory stores (i) multiple hash tables storing associative entries, each including at least one entry key and a respective value, the hash tables are associated with respective different hash functions, and an associative entry is accessible by applying the relevant hash function to a key matching an entry key in the associative entry, and (ii) an affinity table that stores table-selectors for selecting hash tables with which to start a key lookup. The circuitry receives a key, reads from the affinity table, by applying an affinity function to the key, a table-selector that selects a hash table, accesses in the selected hash table an associative entry by applying the hash function associated with the selected hash table to the key, and in response to detecting that the key matches an entry key in the associative entry, outputs the respective value.