An Imitation Learning Approach for Cache Replacement

06/29/2020
by   Evan Zheran Liu, et al.
8

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 addition, on a large-scale web search benchmark, Parrot increases cache hit rates by 61 facilitate research in this area, as data is plentiful, and further advancements can have significant real-world impact.

READ FULL TEXT

page 7

page 8

research
12/20/2019

CacheQuery: Learning Replacement Policies from Hardware Caches

We show how to infer deterministic cache replacement policies using off-...
research
09/29/2022

Chameleon Cache: Approximating Fully Associative Caches with Random Replacement to Prevent Contention-Based Cache Attacks

Randomized, skewed caches (RSCs) such as CEASER-S have recently received...
research
11/05/2018

On the complexity of cache analysis for different replacement policies

Modern processors use cache memory: a memory access that "hits" the cach...
research
05/11/2023

Characterizing the impact of last-level cache replacement policies on big-data workloads

In recent years, graph-processing has become an essential class of workl...
research
01/06/2020

A Fast Analytical Model of Fully Associative Caches

While the cost of computation is an easy to understand local property, t...
research
01/08/2022

A System-Level Framework for Analytical and Empirical Reliability Exploration of STT-MRAM Caches

Spin-Transfer Torque Magnetic RAM (STT-MRAM) is known as the most promis...
research
10/22/2019

Exploiting Data Skew for Improved Query Performance

Analytic queries enable sophisticated large-scale data analysis within m...

Please sign up or login with your details

Forgot password? Click here to reset