arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2304.04954cs.DS
收藏

组相联缓存中的结合度阈值现象

An Associativity Threshold Phenomenon in Set-Associative Caches

Michael A. Bender, Rathish Das, Martín Farach-Colton, Guido Tagliavini

AI总结:

本文研究了 $α$ 路组相联 LRU 缓存性能与集合大小 $α$ 的关系,证明 $α=\omega(\log k)$ 时缺页代价接近全相联缓存,而 $α=o(\log k)$ 时显著恶化,揭示了结合度阈值现象。

摘要:

在 $α$ 路组相联缓存中,缓存被划分为大小为 $α$ 的不相交集合,每个数据项只能缓存于一个集合中,通常通过哈希函数选择。组相联缓存被广泛使用,相较于全相联缓存具有诸多优势(如延迟或并发),但常导致更多缓存未命中。随着集合大小 $α$ 减小,优势增加,但缺页代价恶化。本文刻画了总大小为 $k$ 的 $α$ 路组相联 LRU 缓存作为 $α= α(k)$ 函数的性能。假设集合使用完全随机哈希函数选择,证明如下:- 对于 $α= ω(\log k)$,$α$ 路组相联 LRU 缓存的缺页代价在加性 $O(1)$ 范围内接近大小为 $(1-o(1))k$ 的全相联 LRU 缓存,概率为 $1 - 1/\operatorname{poly}(k)$,适用于所有长度为 $\operatorname{poly}(k)$ 的请求序列。- 对于 $α= o(\log k)$,及所有 $c = O(1)$ 和 $r = O(1)$,$α$ 路组相联 LRU 缓存的缺页代价不在大小为 $k/r$ 的全相联 LRU 缓存的 $c$ 倍范围内,存在长度为 $O(k^{1.01})$ 的请求序列。- 对于 $α= ω(\log k)$,若哈希函数可偶尔更改,$α$ 路组相联 LRU 缓存的缺页代价在 $1 + o(1)$ 倍范围内接近大小为 $(1-o(1))k$ 的全相联 LRU 缓存,概率为 $1 - 1/\operatorname{poly}(k)$,适用于任意(如超多项式)长度的请求序列。部分结果推广至除 LRU 外的其他缺页算法,如最不经常使用(LFU)。

英文摘要:

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/\operatorname{poly}(k)$, for all request sequences of length $\operatorname{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(k^{1.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/\operatorname{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).

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑