GithubHelp home page GithubHelp logo

utah-scs / lsm-sim Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 9.0 1.06 MB

Simulator for comparing memory allocation policies for caches.

License: ISC License

C++ 87.80% Makefile 0.22% Python 5.67% R 0.36% Shell 5.94%

lsm-sim's People

Contributors

bigdata2 avatar danielrichardrushton avatar rstutsman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lsm-sim's Issues

Count gets with size changes incorrectly

Gets in the trace get their size from the subsequent put if they are a miss. This means the weird logic in each policy that infers an extra miss access for each size change that would've otherwise hit in the cache is wrong.

When the size of the value in the cache doesn't match the size of the value recorded with the GET in the trace, it means that GET was/is the miss that induced the set for the correct size. That get should be treated as a miss, not a miss and a hit as we were doing before.

All the policies should be updated accordingly.

Non-unique key ids between trace applications

*Some applications in the trace have collisions between key ids. We may need to add some code to reassign a key to a new key id if it is already in use by another application in the trace.

Add header output to stats

Output headers are in each log() method. We should try to push all of this into stats.

In fact, we can probably move log() directly into policy.cpp

warmup simply throwing data away

warmup needs to actually install values in the cache, but without tracking accesses. This will require a bit of tweaking to each policy.

Output filenames should be determined from stats

We should put log() in policy.cpp and the name of the output file it uses to dump stats should be a function of the values in stats (i.e. whatever set of fields constitutes a key, perhaps removing fields from the name that aren't needed for a particular policy).

Makefile needs dependencies for h files

Right now .o files are recompiled when .h files they include are modified. We should probably just steal the stuff from RAMCloud or HiStar to make this work.

Changes in size class strand old objects in LRUs

Slab allocator simulations currently have an issue where an object that has been promoted to a new size class don't clean up the old object. This could have an impact on accuracy, so we should handle it.

Perhaps we should add a hashtable that indicates the prior size class. And we can remove an element if it is going to be completely relocated to a new class.

Crash observed when executing multislab policy

Steps to reproduce:
cd Tests/TestsVictimCache
../../lsm-sim -a 1 -w 0 -p multislab -s 6000000 -S 60 -M -f ./test5
output:
slab -s 6000000 -S 60 -M -f ./test5
this is e1
Initialized with memcachier slab classes
performing trace analysis on apps 1,
with steal weights of
policy multislab
using trace file ./test5
rounding off
utilization rate 1
start counting hits at t = 0
request limit 0
global mem 6000000
use tax 0
tax rate 0.05
cleaning width 100
time app subpolicy target_mem credit_bytes share min_mem min_mem_pct steal_size bytes_in_use need hits accesses shadow_q_hits survivor_items survivor_bytes evicted_items evicted_bytes hit_rate
0 1 multislab 701423104 0 701423104 526067328 75 0 0 inf 0 0 0 0 0 0 0 -nan
Segmentation fault (core dumped)

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.