[Paper Review] Another one flew over the cuckoo's nest
This paper proposes a non-contiguous cuckoo hashing variant that stores buckets entirely within single memory pages to exploit faster page-level access, improving memory utilization and reducing insertion iterations. By allowing overlapping, non-contiguous buckets within fixed-size pages, the method achieves 97.46% memory utilization and reduces insertion iterations from 545 to 52 at 92% utilization compared to prior variants.
Cuckoo hashing [4] is a multiple choice hashing scheme in which each item can be placed in multiple locations, and collisions are resolved by moving items to their alternative locations. In the classical implementation of two-way cuckoo hashing, the memory is partitioned into contiguous disjoint fixed-size buckets. Each item is hashed to two buckets, and may be stored in any of the positions within those buckets. Ref. [2] analyzed a variation in which the buckets are contiguous and overlap. However, many systems retrieve data from secondary storage in same-size blocks called pages. Fetching a page is a relatively expensive process; but once a page is fetched, its contents can be accessed orders of magnitude faster. We utilize this property of memory retrieval, presenting a variant of cuckoo hashing incorporating the following constraint: each bucket must be fully contained in a single page, but buckets are not necessarily contiguous. Empirical results show that this modification increases memory utilization and decreases the number of iterations required to insert an item. If each item is hashed to two buckets of capacity two, the page size is 8, and each bucket is fully contained in a single page, the memory utilization equals 89.71% in the classical contiguous disjoint bucket variant, 93.78% in the contiguous overlapping bucket variant, and increases to 97.46% in our new non-contiguous bucket variant. When the memory utilization is 92% and we use breadth first search to look for a vacant position, the number of iterations required to insert a new item is dramatically reduced from 545 in the contiguous overlapping buckets variant to 52 in our new non-contiguous bucket variant. In addition to the empirical results, we present a theoretical lower bound on the memory utilization of our variation as a function of the page size.
Motivation & Objective
- To address the inefficiency of traditional cuckoo hashing in systems that access data in fixed-size pages by aligning bucket placement with page boundaries.
- To improve memory utilization in cuckoo hashing by allowing non-contiguous, overlapping buckets within the same page.
- To reduce insertion time by minimizing the number of iterations required to find a vacant slot during insertion.
- To theoretically bound the memory utilization of the proposed variant as a function of page size.
Proposed method
- The method partitions memory into fixed-size pages and ensures each bucket is fully contained within a single page, regardless of spatial contiguity.
- It allows buckets to overlap and be non-contiguous across pages, as long as each bucket resides entirely within one page.
- Items are hashed to two buckets, and insertion proceeds by probing alternative locations, with eviction chains resolved using breadth-first search.
- The system leverages the fact that once a page is fetched, accessing its contents is significantly faster, reducing latency.
- A theoretical lower bound on memory utilization is derived based on page size and bucket capacity.
Experimental results
Research questions
- RQ1How does non-contiguous bucket placement within pages affect memory utilization in cuckoo hashing?
- RQ2To what extent does the new variant reduce insertion iterations compared to contiguous and overlapping bucket variants?
- RQ3What is the theoretical limit of memory utilization for this page-aligned cuckoo hashing variant?
- RQ4How does page-level memory access efficiency influence performance in the proposed scheme?
Key findings
- The proposed non-contiguous cuckoo hashing variant achieves 97.46% memory utilization when each item is hashed to two buckets of capacity two, outperforming 89.71% in the classical contiguous disjoint variant and 93.78% in the overlapping variant.
- At 92% memory utilization, the number of iterations required for insertion drops from 545 in the overlapping variant to 52 in the proposed non-contiguous variant.
- The method improves memory efficiency by aligning bucket placement with page boundaries, reducing the number of page fetches and improving cache locality.
- Empirical results confirm that the non-contiguous bucket approach significantly reduces insertion latency compared to prior cuckoo hashing variants.
- A theoretical lower bound on memory utilization is established as a function of page size, providing a performance benchmark for future designs.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.