-
Notifications
You must be signed in to change notification settings - Fork 0
/
memalloc.sh
79 lines (64 loc) · 2.75 KB
/
memalloc.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
#!/bin/bash -e
run_n_times(){
number=$1
shift
for n in $(seq $number); do
$@
sleep 2
done
}
export GMPT_WIKI_DATA_VOLUME=320000
export GMPT_ETH_DATA_VOLUME=640000
export GMPT_YCSB_DATA_VOLUME=1280000
export GMPT_DATA_LOOKUP_VOLUME=1280000
n1=$GMPT_DATA_LOOKUP_VOLUME
n2=$GMPT_ETH_DATA_VOLUME
n3=$GMPT_WIKI_DATA_VOLUME
n4=$GMPT_YCSB_DATA_VOLUME
# modify the build path
BUILD_PATH=build
# GO_ETH_PATH=./go-ethereum/trie
REPEAT=5
# GO_REPEAT=30
# ncu
NCU=/usr/local/cuda/bin/ncu
rm -rf profile
rm test_alloc.log
# rm ./data/*
mkdir -p profile
# for n in $(seq 8); do
# run_n_times $REPEAT $BUILD_PATH/experiments "--gtest_filter=EXPERIMENTS.PutPhase" >> test_alloc.log
# n1=`expr $n1 / 2`
# n2=`expr $n2 / 2`
# n3=`expr $n3 / 2`
# n4=`expr $n4 / 2`
# export GMPT_DATA_LOOKUP_VOLUME=$n1
# export GMPT_ETH_DATA_VOLUME=$n2
# export GMPT_WIKI_DATA_VOLUME=$n3
# export GMPT_YCSB_DATA_VOLUME=$n4
# done
# export GMPT_WIKI_DATA_VOLUME=320000
# export GMPT_ETH_DATA_VOLUME=640000
# export GMPT_YCSB_DATA_VOLUME=1280000
# export GMPT_DATA_LOOKUP_VOLUME=1280000
# n1=$GMPT_DATA_LOOKUP_VOLUME
# n2=$GMPT_ETH_DATA_VOLUME
# n3=$GMPT_WIKI_DATA_VOLUME
# n4=$GMPT_YCSB_DATA_VOLUME
for n in $(seq 8); do
# sudo GMPT_ETH_DATA_VOLUME=$GMPT_ETH_DATA_VOLUME $NCU -s 5 -f -o profile/InsertEth$GMPT_ETH_DATA_VOLUME $BUILD_PATH/experiments "--gtest_filter=EXPERIMENTS.InsertEthtxn"
# sudo GMPT_DATA_LOOKUP_VOLUME=$GMPT_DATA_LOOKUP_VOLUME $NCU -s 5 -f -o profile/LookupEth$GMPT_DATA_LOOKUP_VOLUME $BUILD_PATH/experiments "--gtest_filter=EXPERIMENTS.LookupEthtxn"
# sudo GMPT_YCSB_DATA_VOLUME=$GMPT_YCSB_DATA_VOLUME $NCU -s 5 -f -o profile/InsertYCSB$GMPT_YCSB_DATA_VOLUME $BUILD_PATH/experiments "--gtest_filter=EXPERIMENTS.InsertYCSB"
# sudo GMPT_DATA_LOOKUP_VOLUME=$GMPT_DATA_LOOKUP_VOLUME $NCU -s 5 -f -o profile/LookupYCSB$GMPT_DATA_LOOKUP_VOLUME $BUILD_PATH/experiments "--gtest_filter=EXPERIMENTS.LookupYCSB"
# sudo GMPT_WIKI_DATA_VOLUME=$GMPT_WIKI_DATA_VOLUME $NCU -s 5 -f -o profile/InsertWiki$GMPT_WIKI_DATA_VOLUME $BUILD_PATH/experiments "--gtest_filter=EXPERIMENTS.InsertWiki"
# sudo GMPT_DATA_LOOKUP_VOLUME=$GMPT_DATA_LOOKUP_VOLUME $NCU -s 5 -f -o profile/LookupWiki$GMPT_DATA_LOOKUP_VOLUME $BUILD_PATH/experiments "--gtest_filter=EXPERIMENTS.LookupWiki"
sudo GMPT_ETH_DATA_VOLUME=$GMPT_ETH_DATA_VOLUME LD_LIBRARY_PATH=$LD_LIBRARY_PATH $NCU --section MemoryWorkloadAnalysis -f -o profile/memEth$GMPT_ETH_DATA_VOLUME $BUILD_PATH/experiments "--gtest_filter=EXPERIMENTS.PutPhase" >> test_alloc.log
n1=`expr $n1 / 2`
n2=`expr $n2 / 2`
n3=`expr $n3 / 2`
n4=`expr $n4 / 2`
export GMPT_DATA_LOOKUP_VOLUME=$n1
export GMPT_ETH_DATA_VOLUME=$n2
export GMPT_WIKI_DATA_VOLUME=$n3
export GMPT_YCSB_DATA_VOLUME=$n4
done