An Associativity Threshold Phenomenon in Set-Associative Caches
Open Access
- 17 June 2023
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 117-127
Abstract
In an α-way set-associative cache, the cache is partitioned into disjoint sets of size α, and each item can only be cached in one set, typically selected via a hash function. Set-associative caches are widely used and have many benefits, e.g., in terms of latency or concurrency, over fully associative caches, but they often incur more cache misses. As the set size α decreases, the benefits increase, but the paging costs worsen. In this paper we characterize the performance of an α-way set-associative LRU cache of total size k, as a function of α = α(k). We prove the following, assuming that sets are selected using a fully random hash function: For α = ω(log k), the paging cost of an α-way set-associative LRU cache is within additive O(1) of that a fully-associative LRU cache of size (1-o(1))k, with probability 1 - 1 / poly (k), for all request sequences of length poly (k). For α = o(log k), and for all c = O(1) and r = O(1), the paging cost of an α-way set-associative LRU cache is not within a factor c of that a fully-associative LRU cache of size k/r, for some request sequence of length O(k1.01). For α = ω(log k), if the hash function can be occasionally changed, the paging cost of an α-way set-associative LRU cache is within a factor 1 + o(1) of that a fully-associative LRU cache of size (1-o(1))k, with probability 1 - 1/poly (k), for request sequences of arbitrary (e.g., super-polynomial) length. Some of our results generalize to other paging algorithms besides LRU, such as least-frequently used (LFU).Keywords
All Related Versions
Funding Information
- NSF (CCF-2118830, CCF-2106827, CSR-1763680, CNS-1938709, CNS-2118620, CCF-2106999)
- NSERC
This publication has 44 references indexed in Scilit:
- The relative worst-order ratio applied to pagingJournal of Computer and System Sciences, 2007
- Towards a theory of cache-efficient algorithmsJournal of the ACM, 2002
- Analytical modeling of set-associative cache behaviorIEEE Transactions on Computers, 1999
- Randomized cache placement for eliminating conflictsIEEE Transactions on Computers, 1999
- An optimality proof of the LRU- K page replacement algorithmJournal of the ACM, 1999
- Thek-server dual and loose competitiveness for pagingAlgorithmica, 1994
- Competitive paging algorithmsJournal of Algorithms, 1991
- Competitive algorithms for server problemsJournal of Algorithms, 1990
- Cache performance of operating system and multiprogramming workloadsACM Transactions on Computer Systems, 1988
- Performance Analysis of Cache MemoriesJournal of the ACM, 1978