Skip to content

Commit 39feb56

Browse files
authored
Add a feature to enable workload loops with varying iodepth values (#836)
1 parent 7b4f818 commit 39feb56

File tree

5 files changed

+29
-20
lines changed

5 files changed

+29
-20
lines changed

config/samples/fio/cr.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ spec:
3838
numjobs:
3939
- 1
4040
# with libaio ioengine, number of in-flight requests per process
41-
iodepth: 4
41+
iodepth:
42+
- 4
4243
# how long to run read tests, this is TOO SHORT DURATION
4344
read_runtime: 15
4445
# how long to run write tests, this is TOO SHORT DURATION

config/samples/fio/vm-cr.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ spec:
5151
numjobs:
5252
- 1
5353
# with libaio ioengine, number of in-flight requests per process
54-
iodepth: 4
54+
iodepth:
55+
- 4
5556
# how long to run write tests, this is TOO SHORT DURATION
5657
read_runtime: 15
5758
# how long to run read tests, this is TOO SHORT DURATION

docs/fio_distributed.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,22 @@ or even days to complete, and the jobs will continue through the nested loops un
4848
The workload loops are nested as such from the CR options:
4949

5050
```
51-
+-------->numjobs---------+
52-
| |
53-
| +------>bs|bsrange----+ |
54-
| | | |
55-
| | +---->job---------+ | |
56-
| | | | | |
57-
| | | +-->samples---+ | | |
58-
| | | | | | | |
59-
| | | | | | | |
60-
| | | +-------------+ | | |
61-
| | +-----------------+ | |
62-
| +---------------------+ |
63-
+-------------------------+
51+
+---------->iodepth-----------+
52+
| |
53+
| +-------->numjobs---------+ |
54+
| | | |
55+
| | +------>bs|bsrange----+ | |
56+
| | | | | |
57+
| | | +---->job---------+ | | |
58+
| | | | | | | |
59+
| | | | +-->samples---+ | | | |
60+
| | | | | | | | | |
61+
| | | | | | | | | |
62+
| | | | +-------------+ | | | |
63+
| | | +-----------------+ | | |
64+
| | +---------------------+ | |
65+
+---------------------------+ |
66+
+-----------------------------+
6467
```
6568

6669
### Understanding the CR options
@@ -131,7 +134,7 @@ The workload loops are nested as such from the CR options:
131134
- 256KiB-4096KiB
132135
```
133136
- **numjobs**: (list) Number of clones of the job to run on each server -- Total jobs will be `numjobs * servers`
134-
- **iodepth**: Number of I/O units to keep in flight against a file; see `fio(1)`
137+
- **iodepth**: (list) Number of I/O units to keep in flight against a file; see `fio(1)`
135138
- **read_runtime**: Amount of time in seconds to run `read` workloads (including `readwrite` workloads)
136139
- **read_ramp_time**: Amount of time in seconds to ramp up `read` workloads (i.e., executing the workload without recording the data)
137140
> Note: We intentionally run `write` workloads to completion of the file size specified in order to ensure

roles/fio_distributed/templates/client.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ spec:
7979
{% for numjobs in workload_args.numjobs %}
8080
{% for i in loopvar %}
8181
{% for job in workload_args.jobs %}
82-
cat /tmp/fio/fiojob-{{job}}-{{i}}-{{numjobs}}; mkdir -p /tmp/fiod-{{uuid}}/fiojob-{{job}}-{{i}}-{{numjobs}};
83-
run_snafu -t fio -H /tmp/host/hosts -j /tmp/fio/fiojob-{{job}}-{{i}}-{{numjobs}} -s {{workload_args.samples}} -d /tmp/fiod-{{ uuid }}/fiojob-{{job}}-{{i}}-{{numjobs}} \
82+
{% for iodepth in workload_args.iodepth %}
83+
cat /tmp/fio/fiojob-{{job}}-{{i}}-{{numjobs}}-{{iodepth}}; mkdir -p /tmp/fiod-{{uuid}}/fiojob-{{job}}-{{i}}-{{numjobs}}-{{iodepth}};
84+
run_snafu -t fio -H /tmp/host/hosts -j /tmp/fio/fiojob-{{job}}-{{i}}-{{numjobs}}-{{iodepth}} -s {{workload_args.samples}} -d /tmp/fiod-{{ uuid }}/fiojob-{{job}}-{{i}}-{{numjobs}}-{{iodepth}} \
8485
{% if workload_args.debug is defined and workload_args.debug %}
8586
-v \
8687
{% endif %}
@@ -93,6 +94,7 @@ spec:
9394
{% endif %}
9495
{% endfor %}
9596
{% endfor %}
97+
{% endfor %}
9698
{% endfor %}
9799
echo run finished"
98100
volumeMounts:

roles/fio_distributed/templates/configmap.yml.j2

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ data:
5050
{% endif %}
5151
{% for i in loopvar %}
5252
{% for job in workload_args.jobs %}
53-
fiojob-{{job}}-{{i}}-{{numjobs}}: |
53+
{% for iodepth in workload_args.iodepth %}
54+
fiojob-{{job}}-{{i}}-{{numjobs}}-{{iodepth}}: |
5455
[global]
5556
{% if workload_args.kind is defined and workload_args.kind == "vm" %}
5657
directory={{fio_path}}
@@ -76,7 +77,7 @@ data:
7677
ioengine=libaio
7778
size={{workload_args.filesize}}
7879
{{loopvar_str}}={{i}}
79-
iodepth={{workload_args.iodepth}}
80+
iodepth={{iodepth}}
8081
direct=1
8182
numjobs={{numjobs}}
8283

@@ -99,3 +100,4 @@ data:
99100
{% endfor %}
100101
{% endfor %}
101102
{% endfor %}
103+
{% endfor %}

0 commit comments

Comments
 (0)