-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfio-test.sh
More file actions
executable file
·33 lines (29 loc) · 847 Bytes
/
fio-test.sh
File metadata and controls
executable file
·33 lines (29 loc) · 847 Bytes
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
#!/bin/bash
# Colour Codes
NOBOLD="\033[0m"
BOLD="\033[1m"
BLACK="\033[30m"
GREY="\033[0m"
RED="\033[31m"
GREEN="\033[32m"
YELLOW="\033[33m"
BLUE="\033[34m"
MAGENTA="\033[35m"
CYAN="\033[36m"
WHITE="\033[37m"
SIZE="2g"
DIRECTORY="/data/whisper"
BLOCKSIZE="8k"
FIO_OPTIONS="--size=${SIZE} --directory=${DIRECTORY} --blocksize=${BLOCKSIZE} --direct=1 --fsync=0 --numjobs=4 --nrfiles=1 --group_reporting --loops=1"
# Write Only
JOBNAME="write"
echo -e "${BOLD}Running fio test for ${NOBOLD}${CYAN}\"${JOBNAME}\"${NOBOLD}"
fio --name=${JOBNAME} --rw=write ${FIO_OPTIONS}
echo -e ""
# Readwrite, 5% read increments to 50%
for percent in $(seq 5 5 50); do
JOBNAME="rw${percent}"
echo -e "${BOLD}Running fio test for ${NOBOLD}${CYAN}\"${JOBNAME}\"${NOBOLD}"
fio --name=${JOBNAME} --rw=rw --rwmixread=${percent} ${FIO_OPTIONS}
echo -e ""
done