forked from secure-foundations/veribetrkv-osdi2020
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-experiments-in-docker-dynamic-frames.sh
executable file
·101 lines (78 loc) · 3.1 KB
/
run-experiments-in-docker-dynamic-frames.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/bin/bash
##### This script runs verification and benchmarks on the veribetrkv-dynamic-frames
##### codebase. It creates a volume, `veribetrkv-dynamic-frames-build` so that
##### build data persists across docker runs.
if [ "$#" -ne 2 ]; then
echo "Usage: ./run-experiments-in-docker-dynamic-frames.sh OUTDIR ssd|hdd"
echo " OUTDIR: Directory where build results will go."
echo " This directory is mounted into the container so that"
echo " build results will persist across runs."
echo " This is also where database images will be built"
echo " during benchmarks."
echo " ssd: Run in the docker artifact named veribetrkv-artifact-ssd."
echo " hdd: Run in the docker artifact named veribetrkv-artifact-hdd."
exit 1
fi
set -e
# demand absolute path
OUTDIR=`realpath "$1"`
HARDWARE=$2
set -x
##### Build executables.
docker run --rm \
-v $OUTDIR:/home/root/veribetrkv-dynamic-frames/build \
-w=/home/root/veribetrkv-dynamic-frames \
veribetrkv-artifact-$HARDWARE:latest \
make elf ycsb
##### Run verification. Will take several hours:
##### use as many cores as you can.
docker run --rm \
-v $OUTDIR:/home/root/veribetrkv-dynamic-frames/build \
-w=/home/root/veribetrkv-dynamic-frames \
veribetrkv-artifact-$HARDWARE:latest \
make status -j4
##### Run key-value store benchmarks with an appropriate memory limit.
# Veribetrkv benchmarks
docker run --rm \
-v $OUTDIR:/home/root/veribetrkv-dynamic-frames/build \
-w=/home/root/veribetrkv-dynamic-frames \
--memory=2g --memory-swappiness=0 \
veribetrkv-artifact-$HARDWARE:latest \
make build/VeribetrfsYcsb.data
# RocksDB benchmarks
docker run --rm \
-v $OUTDIR:/home/root/veribetrkv-dynamic-frames/build \
-w=/home/root/veribetrkv-dynamic-frames \
--memory=2g --memory-swappiness=0 \
veribetrkv-artifact-$HARDWARE:latest \
make build/RocksYcsb.data
# BerkeleyDB benchmarks
docker run --rm \
-v $OUTDIR:/home/root/veribetrkv-dynamic-frames/build \
-w=/home/root/veribetrkv-dynamic-frames \
--memory=2g --memory-swappiness=0 \
veribetrkv-artifact-$HARDWARE:latest \
make build/BerkeleyYcsb.data
##### Run benchmarks of our verified in-memory data structures.
##### We DO NOT set a memory limit here.
# Hash table
docker run --rm \
-v $OUTDIR:/home/root/veribetrkv-dynamic-frames/build \
-w=/home/root/veribetrkv-dynamic-frames \
veribetrkv-artifact-$HARDWARE:latest \
make build/mutable-map-benchmark.csv
# In-memory B-tree
docker run --rm \
-v $OUTDIR:/home/root/veribetrkv-dynamic-frames/build \
-w=/home/root/veribetrkv-dynamic-frames \
veribetrkv-artifact-$HARDWARE:latest \
make build/mutable-btree-benchmark.csv
# Run line-counting routines and put it all together into a pdf.
# Note: you can skip all of the above steps and just run this, if you want,
# since everything above is a dependency via make, but if you do that,
# you won't get the best docker config for each step.
docker run --rm \
-v $OUTDIR:/home/root/veribetrkv-dynamic-frames/build \
-w=/home/root/veribetrkv-dynamic-frames \
veribetrkv-artifact-$HARDWARE:latest \
make build/osdi20-artifact/paper.pdf