utah-scs / lsm-sim Goto Github PK
View Code? Open in Web Editor NEWSimulator for comparing memory allocation policies for caches.
License: ISC License
Simulator for comparing memory allocation policies for caches.
License: ISC License
We need to understand exactly how we want to count compulsory misses, including all subtle edge cases like where a value changes sizes and needs to be relocated.
Seems like the check in the if() break should be == not !=
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.
*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.
Right not shadow q accesses in lsc_multi are filled from proc() accesses. We need the cleaner to clean into that queue instead.
Currently, if no data is put into a free dst seg on cleaning, then it is left as in-use and empty.
A better approach altogether is to only demand free pages when they are needed in the cleaning.
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 needs to actually install values in the cache, but without tracking accesses. This will require a bit of tweaking to each policy.
Some runs for some parameters on some applications crash. We should track those down and fix them.
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).
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.
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.
-p should be able to take a policy name and not just a policy number.
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.