-
Notifications
You must be signed in to change notification settings - Fork 2
/
client.yaml
76 lines (76 loc) · 2.51 KB
/
client.yaml
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
apiVersion: v1
kind: Pod
metadata:
name: fio-client
namespace: simple-fio
labels:
app: fio-client
spec:
containers:
- image: quay.io/abose/fio:latest
securityContext:
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
capabilities:
drop:
- ALL
resources:
requests:
memory: "5Gi"
cpu: "2"
limits:
memory: "8Gi"
cpu: "3"
name: fio-client
volumeMounts:
- name: data-vol
mountPath: "/mnt/"
command: ["/bin/sh", "-c"]
args:
- "echo \"Initializing and Configuring FIO jobs\"; sleep 30;
source /tmp/job_info.txt;
if [ ${prefill} == \"true\" ]; then
echo \"*********Prefill**************\"; echo $(date);
/usr/bin/fio --output=/mnt/prefill_output.log --client=/tmp/server_ip.txt /tmp/prefill.fio;
sleep 10;
if [[ ${server} -eq 1 ]]; then
grep -A6 \"^fio_test\" /mnt/prefill_output.log;
else
grep -A6 \"^All clients\" /mnt/prefill_output.log;
fi;
sleep 60;
fi;
itr=1;
for wl_count in $(seq 1 ${num_of_wl});
do
for bs_count in $(seq 1 ${num_of_bs});
do
for iter in $(seq 1 ${sample});
do
echo \" \"; echo \"*********Fio_Job**************\" ;
mkdir /mnt/fio; cd /mnt/fio;
bs=`grep ^bs /tmp/job${itr}.fio | awk -F \"=\" '{print $2}'`;
rw=`grep ^rw /tmp/job${itr}.fio | awk -F \"=\" '{print $2}'`;
numjobs=`grep ^numjobs /tmp/job${itr}.fio | awk -F \"=\" '{print $2}'`;
iodepth=`grep ^iodepth /tmp/job${itr}.fio | awk -F \"=\" '{print $2}'`;
echo \"$(date) Sample=${iter}; Block_Size=${bs}; job=${rw}; numjobs=${numjobs}; iodepth=${iodepth}\" ;
/usr/bin/fio --output=summary.log --client=/tmp/server_ip.txt /tmp/job${itr}.fio;
sleep 10;
if [[ ${server} -eq 1 ]]; then
grep -A6 \"^fio_test\" summary.log;
else
grep -A6 \"^All clients\" summary.log;
fi;
sleep 50;
cd ..; mv fio fio_${bs}_${rw}_sample${iter}_$(date +%y_%m_%d_%H_%M); rm -rf fio;
done;
itr=$(($itr+1));
done;
done;
"
volumes:
- name: data-vol
persistentVolumeClaim:
claimName: fio-data-pvc
restartPolicy: Never