arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2006.16239cs.LGcs.ARstat.ML
收藏

一种基于模仿学习的缓存替换方法

An Imitation Learning Approach for Cache Replacement

Stanford University(斯坦福大学);Google Research(谷歌研究院)

Evan Zheran Liu, Milad Hashemi, Kevin Swersky, Parthasarathy Ranganathan, Junwhan Ahn

摘要:

程序执行速度关键取决于增加缓存命中,因为缓存命中比未命中快几个数量级。为了增加缓存命中,我们专注于缓存替换的问题:选择插入一个新的行后驱逐的缓存行。这是具有挑战性的,因为它需要提前规划,目前还没有已知的实际解决方案。因此,当前的替换策略通常采用为特定的常见访问模式设计的策略,而这些策略在更多样化和复杂的访问模式上失败。相比之下,我们提出了一个模仿学习的方法来自动学习缓存访问模式,利用Belady的,一个预言机的政策,计算出最佳的驱逐决定,未来的缓存访问。虽然直接应用Belady的是不可行的,因为未来是未知的,我们训练的政策条件下,只有过去的访问,准确地接近Belady的,甚至在不同的和复杂的访问模式,并呼吁这种方法鹦鹉。在对13个内存最密集的SPEC应用程序进行评估时,Parrot将缓存未命中率提高了20%。此外,在大规模Web搜索基准测试中,Parrot将缓存命中率提高了61%。我们发布了一个健身房环境,以促进这一领域的研究,因为数据是丰富的,进一步的进步可能会产生重大的现实影响。

英文摘要:

Program execution speed critically depends on increasing cache hits, as cache hits are orders of magnitude faster than misses. To increase cache hits, we focus on the problem of cache replacement: choosing which cache line to evict upon inserting a new line. This is challenging because it requires planning far ahead and currently there is no known practical solution. As a result, current replacement policies typically resort to heuristics designed for specific common access patterns, which fail on more diverse and complex access patterns. In contrast, we propose an imitation learning approach to automatically learn cache access patterns by leveraging Belady's, an oracle policy that computes the optimal eviction decision given the future cache accesses. While directly applying Belady's is infeasible since the future is unknown, we train a policy conditioned only on past accesses that accurately approximates Belady's even on diverse and complex access patterns, and call this approach Parrot. When evaluated on 13 of the most memory-intensive SPEC applications, Parrot increases cache miss rates by 20% over the current state of the art. In addition, on a large-scale web search benchmark, Parrot increases cache hit rates by 61% over a conventional LRU policy. We release a Gym environment to facilitate research in this area, as data is plentiful, and further advancements can have significant real-world impact.

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

↑