TinyLFU: A Highly Efficient Cache Admission Policy

Gil Einziger, Roy Friedman, Ben Manes
12/2/2015
cs.OS

Official code: ben-manes/caffeine (17,893 stars, Apache-2.0, last commit 2026-10-20).

Abstract

This paper proposes to use a frequency based cache admission policy in order to boost the effectiveness of caches subject to skewed access distributions. Given a newly accessed item and an eviction candidate from the cache, our scheme decides, based on the recent access history, whether it is worth admitting the new item into the cache at the expense of the eviction candidate. Realizing this concept is enabled through a novel approximate LFU structure called TinyLFU, which maintains an approximate representation of the access frequency of a large sample of recently accessed items. TinyLFU is very compact and light-weight as it builds upon Bloom filter theory. We study the properties of TinyLFU through simulations of both synthetic workloads as well as multiple real traces from several sources. These simulations demonstrate the performance boost obtained by enhancing various replacement policies with the TinyLFU eviction policy. Also, a new combined replacement and eviction policy scheme nicknamed W-TinyLFU is presented. W-TinyLFU is demonstrated to obtain equal or better hit-ratios than other state of the art replacement policies on these traces. It is the only scheme to obtain such good results on all traces.

View on arXivView PDF

Code Implementations(1)

ben-manes/caffeineOfficial100%
Apache-2.0

A high performance caching library for Java

17,8931,723HTML, JavaDec 13, 20145 days agoApache-2.0

Similar Papers

Cite this paper

@article{einziger2015tinylfu,
  title  = {TinyLFU: A Highly Efficient Cache Admission Policy},
  author = {Gil Einziger and Roy Friedman and Ben Manes},
  year   = {2015},
  eprint = {1512.00727},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1512.00727}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1512.00727.svg)](https://codeofpaper.com/paper/1512.00727)

Discussion