Coder Social home page Coder Social logo

frozenhot's Introduction

FrozenHot Cache: Rethinking Cache Management for Modern Software

This repository contains simulation code and instructions to reproduce key results in the paper "FrozenHot Cache: Rethinking Cache Management for Modern Hardware" (to appear in EuroSys'23).

Repo Introduction

Cache implementations can be found under cache/, including hhvm_lru_cache_FH.h (LRU-FH), hhvm_lru_cache.h (LRU), lfu_FH.h (LFU), lfu.h (LFU), redis_lru.h (Redis-LRU), FIFO_FH.h (FIFO), and FIFO.h (FIFO).

We use utils in ssdlogging/ from SPDK, e.g. random generator, current time, distribution stats, etc.

The framework of this benchmark is organized by traceloader/client.h, traceloader/trace_loader.h, and test_trace.cpp.

Hardware requirement

No less than 32 CPU cores per socket, and no less than around 100 GiB memory per numa node (to bind thread in CPU core and avoid cross-numa memory access).

Deployment & Usage

git clone this_repo
cd this_repo
git submodule update --init --recursive

# compile CLHT
cd CLHT && ./prepare_everything.sh
cd ..

# lib preparation (ubuntu as an example)
sudo apt update
sudo apt install cmake libtbb-dev numactl

# compile project
./prepare.sh

# fill param in run.py and then test by yourself
python run_no_trace.py

To satisfy hardware requirements (up to 72 cores in the same socket), enable hyperthreading to use cores from a single socket. (require root privileges)

# enable hyperthreading
echo on > /sys/devices/system/cpu/smt/control

See #define XEONR8360 in traceloader/client.h. Change those codes to use the correct CPU ids. It is not hardware-aware now. The goal is to set client threads on each cpu within single socket.

Additional Instruction

Run MSR Cambridge traces in the original format, but better run Twitter traces in binary format (to save time and memory overhead). If you are going to run Twitter traces in the original format, you need to change this call loader_1 = new TraceLoader(request_num, param, work_type, twitter_start, twitter_end, true); (traceloader/client.h).

Note that we assume the machine has at least 100 GiB memory (see traceloader/trace_loader.h code: requests_ = (request*)malloc(100ull*1024*1024*1024);) in numa node 0 (see example python script code: numactl --membind=0 xxx).

Key Results

  • Figure 8: Throughput improvement for all algorithm workload combinations, with increasing thread counts. (about 100 compute hours expected)
  • Figure 9: FC hit share with FH versions of algorithms (about 12 compute hours expected)
  • Figure 13: FH sensitivity to FC lifetime factor
  • Figure 14: LRU vs. FIFO, before and after enabling FH (about 75 compute hours expected)
  • Figure 15: Sensitivity analysis with Zipf 0.99 at 72 threads.

See details in evaluation folder.

The experiments might take hours to tens of hours.

License

This software is licensed under the Apache 2.0 license, see LICENSE for details.

frozenhot's People

Contributors

ziyueqiu avatar ericchengwow avatar xzwj1699 avatar er1ccheng avatar

Stargazers

 avatar Zhang Cao avatar  avatar Charles-Xiao avatar  avatar sherkevin avatar  avatar Ou avatar LiuVivian avatar Yang Jiawei avatar Hengyue Kang avatar Pangyu Li avatar Zhou Zikai avatar  avatar Pedro Peixoto avatar Zhelong Zhao avatar ZLAA avatar 聂世强 avatar smallkirby avatar Jonghyeon Kim avatar llixiao avatar 吴天铭 avatar

Watchers

Juncheng Yang avatar  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.