Skip to content

Commit

Permalink
update README and script
Browse files Browse the repository at this point in the history
  • Loading branch information
1a1a11a committed Jun 26, 2023
1 parent 4719a8c commit 21421d5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# libCacheSim - building and running cache simulations

<!-- [![Documentation Status](https://readthedocs.org/projects/libCacheSim/badge/?version=master)](http://libCacheSim.readthedocs.io/en/develop/?badge=master)
[![GitHub version](https://badge.fury.io/gh/1a1a11a%2FlibCasheSim.svg)](https://badge.fury.io/gh/1a1a11a%2FlibCasheSim) -->


[![build](https://github.com/1a1a11a/libCacheSimPrv/actions/workflows/build.yml/badge.svg)](https://github.com/1a1a11a/libCacheSimPrv/actions/workflows/build.yml)


Expand Down Expand Up @@ -42,6 +38,7 @@ cachesim supports the following algorithms:
* [GLCache](/libCacheSim/cache/eviction/GLCache/GLCache.c)
* [Belady](/libCacheSim/cache/eviction/Belady.c)
* [BeladySize](/libCacheSim/cache/eviction/BeladySize.c)
* [QD-LP](/libCacheSim/cache/eviction/qdlp.c)

---

Expand Down Expand Up @@ -100,7 +97,7 @@ Run the example traces with LRU eviction algorithm and 1GB cache size.
./bin/cachesim ../data/trace.vscsi vscsi lru 0.001,0.01,0.1,0.2

# besides using byte as the unit, you can also treat all objects having the same size, and the size is the number of objects
./bin/cachesim ../data/trace.vscsi vscsi lru 1000,16000 --ignore obj-size 1
./bin/cachesim ../data/trace.vscsi vscsi lru 1000,16000 --ignore-obj-size 1

# use a csv trace, note the qutation marks when you have multiple options
./bin/cachesim ../data/trace.csv csv lru 1gb -t "time-col=2, obj-id-col=5, obj-size-col=4"
Expand All @@ -109,7 +106,7 @@ Run the example traces with LRU eviction algorithm and 1GB cache size.
./bin/cachesim ../data/trace.csv csv lru 1gb -t "time-col=2, obj-id-col=5, obj-size-col=4, delimiter=,, has-header=true"
```

See [quick start cachesim](doc/quickstart_cachesim.md) for more usages.
See [quick start cachesim](/doc/quickstart_cachesim.md) for more usages.


#### Plot miss ratio curve
Expand Down Expand Up @@ -189,7 +186,7 @@ libCacheSim supports *txt*, *csv*, and *binary* traces. We prefer binary traces

We also support zstd compressed binary traces without decompression. This allows you to store the traces with less space.

If you need to add a new trace type, please see [here](/doc/advanced_lib_extend.md) for details.
If you need to add a new trace type or a new algorithm, please see [here](/doc/advanced_lib_extend.md) for details.


---
Expand Down
11 changes: 9 additions & 2 deletions doc/quickstart_cachesim.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,14 @@ Note that vscsi is a trace format, we also support csv traces.
./cachesim ../data/trace.vscsi vscsi lru 0.001,0.01,0.1,0.2

# besides using byte as the unit, you can also treat all objects having the same size, and the size is the number of objects
./cachesim ../data/trace.vscsi vscsi lru 1000,16000 --ignore obj-size 1
```
./cachesim ../data/trace.vscsi vscsi lru 1000,16000 --ignore-obj-size 1

# new feature: you can run a few algorithms in parallel by concatenating the algorithms
./cachesim ../data/trace.vscsi vscsi fifo,lru,arc,qdlp 0.01 --ignore-obj-size 1

# run 4*4 simulations in parallel (no more than n_thread at the same time)
./cachesim ../data/trace.vscsi vscsi fifo,lru,arc,qdlp 0.01,0.05,0.1,0.2 --ignore-obj-size 1
```


### Auto detect cache sizes
Expand Down Expand Up @@ -73,6 +79,7 @@ cachesim supports the following algorithms:
* [GLCache](/libCacheSim/cache/eviction/GLCache/GLCache.c)
* [Belady](/libCacheSim/cache/eviction/Belady.c)
* [BeladySize](/libCacheSim/cache/eviction/BeladySize.c)
* [QD-LP](/libCacheSim/cache/eviction/QDLP.c)

You can just use the algorithm name as the eviction algorithm parameter, for example

Expand Down
6 changes: 4 additions & 2 deletions scripts/prepare_public.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
SORUCE=$(readlink -f ${BASH_SOURCE[0]})
DIR=$(dirname ${SORUCE})

rm -r ${DIR}/traceUtils;
rm -r ${DIR}/customized;
rm -r ${DIR}/priv;


cd ${DIR}/../libCacheSim/;
# find . -name priv -type d;
find . -name priv -type d -exec rm -rf {} \;
find . -name priv -type d -exec rm -rf {} \; -prune

0 comments on commit 21421d5

Please sign in to comment.