-
Notifications
You must be signed in to change notification settings - Fork 0
/
filebench
executable file
·68 lines (58 loc) · 1.57 KB
/
filebench
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
#!/bin/bash
cd filebenches
RESULTS=../results/$FS/filebench
mkdir -p $RESULTS
TSET=( 18 1 )
REPS=10
sudo sh -c 'echo 0 > /proc/sys/kernel/randomize_va_space'
reinit() {
cd ..
./umount
if [ $FS == "Bento-fs" ] || [ $FS == "Bento-user" ]; then
./bento_init
elif [ $FS == "Bento-prov" ]; then
./bento-prov_init
fi
./prepare_disk
./mount
cd filebenches
}
for f in *.f; do
# These workloads are wobly with Bento, so
reinit
sed -i -e "s#set \$dir=.*#set \$dir=$MNT#g" $f
echo "Running $f"
mkdir -p $RESULTS/$f
if echo $f | grep "1t"; then
for T in "${TSET[@]}"; do
sed -i -e "s#set \$nthreads=.*#set \$nthreads=$T#g" $f
WREPS=$REPS
# These are bugged :(
if [[ ( $FS == "Bento-fs" || $FS == "Bento-prov" ) && ( $f == "createfiles_1t.f" || $f == "deletefiles_1t.f" || $f == seq_write_1t_* ) ]]; then
WREPS=1
fi
for i in $(seq 1 $WREPS); do
echo "i=$i, T=$T"
if [ $f == "createfiles_1t.f" ] || [ $f == "deletefiles_1t.f" ]; then
sed -i -e "s#set \$fn=.*#set \$fn=fs$f$T$i#g" $f
fi
sudo filebench -f $f > $RESULTS/$f/$T\_$i
done
# In some(!) cases this is redundant yes... But these two workloads really require
# the disk to be formatted between every single run with Bento....
if [ $f == "createfiles_1t.f" ] || [ $f == "deletefiles_1t.f" ]; then
# These workloads are wobly, so
reinit
fi
done
else
WREPS=$REPS
if [[ ( $FS == "Bento-fs" || $FS == "Bento-prov" ) && $f == "webserver.f" ]]; then
WREPS=4
fi
for i in $(seq 1 $WREPS); do
echo "i=$i"
sudo filebench -f $f > $RESULTS/$f/$i
done
fi
done