Hash Table Biased Bucket Partitioning for Cache Performance

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Large hash tables with uniform distribution of contents across buckets lead to poor cache performance due to mixing frequently-accessed and infrequently-accessed data, hindering the cache's ability to capture a hot working set.

Innovation Solution

Partitioning hash table buckets into frequently-accessed and less frequently-accessed sets, using biased mapping hash functions to store and retrieve data, and employing access tracking to move items between these sets based on access frequency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of manufacture

If hash tables uniformly distribute contents across all buckets, then loading across buckets remains even, but cache performance deteriorates due to mixing frequently-accessed and infrequently-accessed items

Engineering Contradiction:
Improveuniform loading distributionVSAvoidcache performance
Core Design Contradiction:
Ease of manufactureVSReliability

Solution Approach 1:

The hash table buckets are segmented into two distinct sets: frequently-accessed buckets and infrequently-accessed buckets. This segmentation allows the system to separate hot data from cold data, enabling caches to efficiently capture frequently-accessed items while maintaining even loading distribution across the entire hash table through biased hash functions.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Different regions of the hash table (frequently-accessed buckets vs. infrequently-accessed buckets) are assigned different qualities or characteristics. The frequently-accessed buckets are optimized for cache performance with items that benefit from caching, while infrequently-accessed buckets contain items less critical for cache retention, creating local optimization without sacrificing global uniformity.

Inventive Principle:
Principle #3Local quality

2Quantity of substance

If hash buckets are sized to fit multiple slots within a single cache line, then storage efficiency improves, but cache effectiveness decreases due to fetching infrequently-used items alongside frequently-used items

Engineering Contradiction:
Improvestorage efficiencyVSAvoidcache effectiveness
Core Design Contradiction:
Quantity of substanceVSReliability

Solution Approach 1:

Infrequently-accessed items are extracted from the frequently-accessed bucket set and placed in a separate infrequently-accessed bucket set. This extraction ensures that when cache lines are fetched for frequently-accessed items, only relevant hot data is retrieved, eliminating the waste of fetching cold data that would otherwise be mixed in the same cache lines.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The system adds a dimensional separation by creating two distinct bucket sets rather than using a single uniform bucket set. This dimensional change (from one bucket set to two) allows the system to maintain storage efficiency while improving cache effectiveness by organizing data along the access frequency dimension.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Data Source

PatentUS11899642B2System and method using hash table with a set of frequently-accessed buckets and a set of less frequently-accessed buckets
Publication Date: 2024.02.13 ADVANCED MICRO DEVICES INC
  • US11899642B2 patent drawing
  • US11899642B2 patent drawing
  • US11899642B2 patent drawing

AI summary

A method and apparatus perform a first hash operation on a first key wherein the first hash operation is biased to map the first key and associated value to a set of frequently-accessed buckets in a hash table. An entry for the first key and associated value is stored in the set of frequently-accessed buckets. A second hash operation is performed on a second key wherein the second hash operation is biased to map the second key and associated value to a set of less frequently-accessed buckets in the hash table. An entry for the second key and associated value is stored in the set of less frequently-accessed buckets. The method and apparatus perform a hash table look up of the requested key in the set of frequently-accessed buckets, if the requested key is not found, then a hash table lookup is performed in the set of less frequently-accessed buckets.