GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — libCacheSim/scripts at develop · 1a1a11a/libCacheSim

Expand file tree

/

scripts

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

scripts

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
pyutils
pyutils
 
 
traceAnalysis
traceAnalysis
 
 
utils
utils
 
 
README.md
README.md
 
 
__init__.py
__init__.py
 
 
benchmark_throughput.py
benchmark_throughput.py
 
 
data_gen.py
data_gen.py
 
 
debug.sh
debug.sh
 
 
install_dependency.sh
install_dependency.sh
 
 
install_dev_dependency.sh
install_dev_dependency.sh
 
 
install_libcachesim.sh
install_libcachesim.sh
 
 
lcs_reader.py
lcs_reader.py
 
 
plot_appr_mrc.py
plot_appr_mrc.py
 
 
plot_mrc_size.py
plot_mrc_size.py
 
 
plot_mrc_time.py
plot_mrc_time.py
 
 
profile_mrc.py
profile_mrc.py
 
 
run_traceAnalyzer.sh
run_traceAnalyzer.sh
 
 
s4fifo_embed_model.py
s4fifo_embed_model.py
 
 
s4fifo_export_model.py
s4fifo_export_model.py
 
 
setup_hooks.sh
setup_hooks.sh
 
 
sync_node_version.py
sync_node_version.py
 
 

README.md

Outline

Installation, plotting miss ratio curves, and trace analysis

Installation

# install dependency
bash install_dependency.sh

# install libCacheSim
bash install_libCacheSim.sh

Plot miss ratio curves

# plot miss ratio over sizes 
python3 plot_mrc_size.py \
--tracepath ../data/twitter_cluster52.csv --trace-format csv \
--trace-format-params="time-col=1,obj-id-col=2,obj-size-col=3,delimiter=,,obj-id-is-num=1" \
--algos=fifo,lru,lecar,s3fifo

# plot miss ratio over time
python3 plot_mrc_time.py \
--tracepath ../data/twitter_cluster52.csv --trace-format csv \
--trace-format-params="time-col=1,obj-id-col=2,obj-size-col=3,delimiter=,,obj-id-is-num=1" \
--algos=fifo,lru,lecar,s3fifo \
--report-interval 120

Profile miss ratio curves

mrcProfiler enables fast profiling of miss ratio curves. With a proper parameter setting (such as sampling_rate, see here for details) mrcProfiler can profile miss ratio curves in a fast way with acceptable accuracy. Names passed to --algos are case-insensitive, so LRU,FIFO and lru,fifo both work.

# plot profiled miss ratio over sizes
python3 profile_mrc.py \
--tracepath ../data/twitter_cluster52.csv --trace-format csv \
--trace-format-params="time-col=1,obj-id-col=2,obj-size-col=3,delimiter=,,obj-id-is-num=1" \
--profiler=MINISIM --algos=LRU,FIFO,ARC,S3FIFO --profiler-params=FIX_RATE,0.1,10 \
--sizes=0.01,0.02,0.05,0.10,0.20,0.40

Trace analysis

Generate the plot data

Plot data are generated using traceAnalyzer using

./bin/traceAnalyzer /path/trace trace_format --common

Visualize the trace

Then we can plot access pattern, request rate, size, reuse, and popularity using the following commands:

python3 traceAnalysis/access_pattern.py ${dataname}.access
python3 traceAnalysis/req_rate.py ${dataname}.reqRate_w300
python3 traceAnalysis/size.py ${dataname}.size
python3 traceAnalysis/reuse.py ${dataname}.reuse
python3 traceAnalysis/popularity.py ${dataname}.popularity

# plot more expensive analysis
python3 traceAnalysis/size_heatmap.py ${dataname}.sizeWindow_w300
python3 traceAnalysis/popularity_decay.py ${dataname}.popularityDecay_w300
python3 traceAnalysis/reuse_heatmap.py ${dataname}.reuseWindow_w300

Note

  • The support for the Belady and BeladySize algorithms is limited to oracleGeneral traces because these traces contain future request information that Belady and BeladySize rely on.
  • When the object size is considered (i.e., --ignore-obj-size 1 is not provided as a command-line argument), BeladySize should be used instead of Belady.

Generate Synthetic Workload

We can generate a Zipf-distributed workload in either txt or oracleGeneral format using data_gen.py. The skewness of the distribution can be controlled with the --alpha parameter (greater than or equal to 0). A smaller value of --alpha results in less skewness. When --alpha is set to 0, the distribution reduces to a uniform distribution.

python3 data_gen.py -m 1000000 -n 100000000 --alpha 1 > /disk/data/zipf_1_1_100.txt

python3 data_gen.py -m 10000000 -n 100000000 --alpha 1 --bin-output zipf_1_10_100.oracleGeneral
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.