-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_test.sh
executable file
·97 lines (76 loc) · 4.11 KB
/
run_test.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
#!/bin/bash
temp_th=$(mktemp)
temp_file_libc=$(mktemp)
temp_file_tc=$(mktemp)
temp_file_je=$(mktemp)
iterations=1000000
NPROC=$(($(nproc)/4))
echo "#th" > $temp_th
echo "libc" > $temp_file_libc
echo "tcmalloc" > $temp_file_tc
echo "jemalloc" > $temp_file_je
echo "ops/sec for 64 byte objects"
for th in $(eval echo "{0..$NPROC}"); do
echo $th >> $temp_th
numactl --cpunodebind=0 ./proxy_libc --iterations=$iterations --threads=$th --min-size=64 | grep "ops per second" | cut -d ':' -f 2 >> $temp_file_libc
numactl --cpunodebind=0 ./proxy_tc --iterations=$iterations --threads=$th --min-size=64 | grep "ops per second" | cut -d ':' -f 2 >> $temp_file_tc
numactl --cpunodebind=0 ./proxy_je --iterations=$iterations --threads=$th --min-size=64 | grep "ops per second" | cut -d ':' -f 2 >> $temp_file_je
done
paste $temp_th $temp_file_libc $temp_file_tc $temp_file_je | column -t -R 1,2,3,4
echo "#th" > $temp_th
echo "libc" > $temp_file_libc
echo "tcmalloc" > $temp_file_tc
echo "jemalloc" > $temp_file_je
echo ""
echo "ops/sec for 64-1024 byte objects"
for th in $(eval echo "{0..$NPROC}"); do
echo $th >> $temp_th
numactl --cpunodebind=0 ./proxy_libc --iterations=$iterations --threads=$th --min-size=64 --max-size=1024 | grep "ops per second" | cut -d ':' -f 2 >> $temp_file_libc
numactl --cpunodebind=0 ./proxy_tc --iterations=$iterations --threads=$th --min-size=64 --max-size=1024 | grep "ops per second" | cut -d ':' -f 2 >> $temp_file_tc
numactl --cpunodebind=0 ./proxy_je --iterations=$iterations --threads=$th --min-size=64 --max-size=1024 | grep "ops per second" | cut -d ':' -f 2 >> $temp_file_je
done
paste $temp_th $temp_file_libc $temp_file_tc $temp_file_je | column -t -R 1,2,3,4
echo "#th" > $temp_th
echo "libc" > $temp_file_libc
echo "tcmalloc" > $temp_file_tc
echo "jemalloc" > $temp_file_je
for th in $(eval echo "{0..$NPROC}"); do
echo $th >> $temp_th
numactl --cpunodebind=0 ./proxy_libc --iterations=$iterations --threads=$th --min-size=65536 | grep "ops per second" | cut -d ':' -f 2 >> $temp_file_libc
numactl --cpunodebind=0 ./proxy_tc --iterations=$iterations --threads=$th --min-size=65536 | grep "ops per second" | cut -d ':' -f 2 >> $temp_file_tc
numactl --cpunodebind=0 ./proxy_je --iterations=$iterations --threads=$th --min-size=65536 | grep "ops per second" | cut -d ':' -f 2 >> $temp_file_je
done
echo ""
echo "results for 64 KB objects"
paste $temp_th $temp_file_libc $temp_file_tc $temp_file_je | column -t -R 1,2,3,4
echo "#th" > $temp_th
echo "libc" > $temp_file_libc
echo "tcmalloc" > $temp_file_tc
echo "jemalloc" > $temp_file_je
for th in $(eval echo "{0..$NPROC}"); do
echo $th >> $temp_th
numactl --cpunodebind=0 ./proxy_libc --iterations=$iterations --threads=$th --min-size=1024 --max-size=65536 | grep "ops per second" | cut -d ':' -f 2 >> $temp_file_libc
numactl --cpunodebind=0 ./proxy_tc --iterations=$iterations --threads=$th --min-size=1024 --max-size=65536 | grep "ops per second" | cut -d ':' -f 2 >> $temp_file_tc
numactl --cpunodebind=0 ./proxy_je --iterations=$iterations --threads=$th --min-size=1024 --max-size=65536 | grep "ops per second" | cut -d ':' -f 2 >> $temp_file_je
done
echo ""
echo "results for 1-64 KB objects"
paste $temp_th $temp_file_libc $temp_file_tc $temp_file_je | column -t -R 1,2,3,4
echo "#th" > $temp_th
echo "libc" > $temp_file_libc
echo "tcmalloc" > $temp_file_tc
echo "jemalloc" > $temp_file_je
for th in $(eval echo "{0..$NPROC}"); do
echo $th >> $temp_th
numactl --cpunodebind=0 ./proxy_libc --iterations=$iterations --threads=$th --min-size=1048576 | grep "ops per second" | cut -d ':' -f 2 >> $temp_file_libc
numactl --cpunodebind=0 ./proxy_tc --iterations=$iterations --threads=$th --min-size=1048576 | grep "ops per second" | cut -d ':' -f 2 >> $temp_file_tc
numactl --cpunodebind=0 ./proxy_je --iterations=$iterations --threads=$th --min-size=1048576 | grep "ops per second" | cut -d ':' -f 2 >> $temp_file_je
done
echo ""
echo "results for 1 MB objects"
paste $temp_th $temp_file_libc $temp_file_tc $temp_file_je | column -t -R 1,2,3,4
# cleanup
rm ${temp_th}
rm ${temp_file_libc}
rm ${temp_file_tc}
rm ${temp_file_je}