The CS/ECE 4/599 Course Blog

High Performance Cache Replacement Using Re-Reference Interval Prediction (RRIP)

by Thomas Pinon (Leader / Presentor), Eric Morgan (scribe), James S. Tappert (blogger)

Introduction

Cache replacement policies play a central role in determining the effectiveness of modern cache hierarchies. Despite decades of architectural evolution, the dominant policy remains Least Recently Used (LRU), largely due to its intuitive appeal and historical simplicity. However, LRU operates off the assumption that recent access implies near-future reuse. While often true, this assumption fails for a wide range of contemporary workloads, including streaming applications, large working sets, and multiprogrammed environments where interference dominates cache behavior.

The paper High Performance Cache Replacement Using Re-reference Interval Prediction (RRIP) introduces RRIP as an alternative replacment policy to LRU. Rather than estimating reuse indirectly through recency, RRIP explicitly predicts how far in the future a cache block will be referenced again. This alternative prediction method enables replacement decisions that more closely approximate optimal behavior, while still remaining implementable in real hardware.

Background and Motivation

Limitations of LRU

LRU assumes that recently accessed data will be reused in the near future. This assumption breaks down in several common scenarios:

In such cases, LRU allows non-temporal data to evict frequently reused cache blocks, significantly degrading performance.

Key Concepts and Terminology

Overview of the RRIP Mechanism

RRIP associates each cache block with an RRPV counter that represents its predicted reuse distance. Conceptually:

Replacement Policy

On a cache miss:

  1. The cache searches for a block with the maximum RRPV.
  2. If no such block exists, all RRPVs are incremented until at least one reaches the maximum value.
  3. A block with the maximum RRPV is selected for eviction.

On a cache hit:

Scan Resistance and Adaptivity

SRRIP inserts new cache blocks with long predicted reuse distances, preventing streaming data from displacing frequently reused blocks. DRRIP extends this approach by dynamically choosing between SRRIP and BRRIP based on runtime behavior. Using set dueling, DRRIP adapts to workload characteristics without software intervention.

Evaluation and Results

The authors evaluate RRIP across a wide range of single-core and multi-core workloads. Key findings include:

These results demonstrate that RRIP provides consistent gains with minimal additional hardware cost.

Strengths and Limitations

Strengths

Limitations

Class Discussion

Conclusion

The RRIP framework illustrates that cache replacement policies can be both simple and highly effective when they directly model reuse behavior. By predicting re-reference intervals instead of relying on recency, RRIP consistently outperforms traditional LRU while maintaining low hardware overhead. The success of DRRIP further demonstrates the importance of adaptive policies in handling modern, diverse workloads.

References

Generative AI Disclosure