Giter Site home page Giter Site logo

sylab / lecar Goto Github PK

View Code? Open in Web Editor NEW
20.0 1.0 8.0 157 KB

The design and algorithms used in LeCaR are described in this USENIX HotStorage'18 paper and talk slides: https://www.usenix.org/conference/hotstorage18/presentation/vietri

Python 100.00%

lecar's Introduction

Driving Cache Replacement with ML-based LeCaR

LeCaR is ML-based algorithm that uses reinforcement learning and regret minimization to model the cache replacement problem. LeCaR relies only on two fundamental policies: recency-based and frequency-based evictions. Each policy has an assigned weight (probability distribution) that is learned based on wrong decisions. LeCaR achieves good performance when cache sizes are small relative to the working set.

More details about this work can be found in the link to the paper: LeCaR HotStorage'18 (PDF)

Citation:

@inproceedings {216890,
author = {Giuseppe Vietri and Liana V. Rodriguez and Wendy A. Martinez and Steven Lyons and Jason Liu and Raju Rangaswami and Ming Zhao and Giri Narasimhan},
title = {Driving Cache Replacement with ML-based LeCaR},
booktitle = {10th {USENIX} Workshop on Hot Topics in Storage and File Systems (HotStorage 18)},
year = {2018},
address = {Boston, MA},
url = {https://www.usenix.org/conference/hotstorage18/presentation/vietri},
publisher = {{USENIX} Association},
month = jul,
}

Code source

The LRU, LFU, ARC and LeCaR implementations can be found in the code/alg folder. Additional code for data structure implementations are in the code/alg/lib folder.

To run experiments, the arguments can be modified appropriately with the specific parameters such as cache size, input trace and algorithm name. Executing the following command inside the code directory will produce the results:

python3 run.py <cache_size> <algorithm> <trace_name>

For instance, running the commands

python3 run.py 4 lru data.txt
python3 run.py 4 lfu data.txt
python3 run.py 4 arc data.txt
python3 run.py 4 lecar data.txt

will produce the following outputs

Results: lru size=4 hits=181, misses=319, ios=500, hitrate=36.2%, data.txt
Results: lfu size=4 hits=132, misses=368, ios=500, hitrate=26.4%, data.txt
Results: arc size=4 hits=176, misses=324, ios=500, hitrate=35.2%, data.txt
Results: lecar size=4 hits=183, misses=317, ios=500, hitrate=36.6%, data.txt

Traces

The synthetic trace with 4 phase changes and the source code to generate phase changes in the working set can be found in the /synth-traces folder.

The FIU workloads (day 3) are publicly available on the SNIA Website.

lecar's People

Contributors

sylab avatar

Stargazers

Wang Xi avatar Jack W. avatar MukdenJGao avatar AntiTopQuark avatar Frank avatar  avatar  avatar  avatar  avatar Zhang sen avatar Libin Zhang avatar rainy2k avatar  avatar Jiacheng Shen avatar Han Shukai avatar Yemaoxin avatar Euler avatar  avatar 波了个波 avatar Omkar Bhalerao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.