-
Notifications
You must be signed in to change notification settings - Fork 4.1k
/
run_write_sweep.sh
executable file
·58 lines (51 loc) · 1.45 KB
/
run_write_sweep.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
#!/bin/bash
function prep_folder()
{
folder=$1
if [[ -d ${folder} ]]; then
rm -f ${folder}/*
else
mkdir -p ${folder}
fi
}
if [[ $# -ne 3 ]]; then
echo "Usage: $0 <write size in MB> <write dir ><output log dir>"
exit 1
fi
SIZE="$1M"
WRITE_DIR=$2
LOG_DIR=$3
OUTPUT_FILE=${WRITE_DIR}/ds_aio_write_${SIZE}B.pt
WRITE_OPT="--write_file ${OUTPUT_FILE} --write_size ${SIZE}"
prep_folder ${WRITE_DIR}
prep_folder ${LOG_DIR}
RUN_SCRIPT=./test_ds_aio.py
for sub in single block; do
if [[ $sub == "single" ]]; then
sub_opt="--single_submit"
else
sub_opt=""
fi
for ov in overlap sequential; do
if [[ $ov == "overlap" ]]; then
ov_opt="--overlap_events"
else
ov_opt=""
fi
for t in 1 2 4 8; do
for p in 1; do
for d in 1 2 4 8 16 32; do
for bs in 128K 256K 512K 1M; do
SCHED_OPTS="${sub_opt} ${ov_opt} --handle --threads 1"
OPTS="--io_parallel ${p} --queue_depth ${d} --block_size ${bs}"
LOG="${LOG_DIR}/write_${SIZE}B_${sub}_${ov}_t${t}_p${p}_d${d}_bs${bs}.txt"
cmd="python ${RUN_SCRIPT} ${WRITE_OPT} ${OPTS} ${SCHED_OPTS} &> ${LOG}"
echo ${cmd}
eval ${cmd}
sleep 2
done
done
done
done
done
done