Skip to content

Commit

Permalink
Add a feature to enable workload loops with varying iodepth values (#836
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ddomingu authored Jan 8, 2025
1 parent 7b4f818 commit 39feb56
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 20 deletions.
3 changes: 2 additions & 1 deletion config/samples/fio/cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ spec:
numjobs:
- 1
# with libaio ioengine, number of in-flight requests per process
iodepth: 4
iodepth:
- 4
# how long to run read tests, this is TOO SHORT DURATION
read_runtime: 15
# how long to run write tests, this is TOO SHORT DURATION
Expand Down
3 changes: 2 additions & 1 deletion config/samples/fio/vm-cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ spec:
numjobs:
- 1
# with libaio ioengine, number of in-flight requests per process
iodepth: 4
iodepth:
- 4
# how long to run write tests, this is TOO SHORT DURATION
read_runtime: 15
# how long to run read tests, this is TOO SHORT DURATION
Expand Down
31 changes: 17 additions & 14 deletions docs/fio_distributed.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,22 @@ or even days to complete, and the jobs will continue through the nested loops un
The workload loops are nested as such from the CR options:

```
+-------->numjobs---------+
| |
| +------>bs|bsrange----+ |
| | | |
| | +---->job---------+ | |
| | | | | |
| | | +-->samples---+ | | |
| | | | | | | |
| | | | | | | |
| | | +-------------+ | | |
| | +-----------------+ | |
| +---------------------+ |
+-------------------------+
+---------->iodepth-----------+
| |
| +-------->numjobs---------+ |
| | | |
| | +------>bs|bsrange----+ | |
| | | | | |
| | | +---->job---------+ | | |
| | | | | | | |
| | | | +-->samples---+ | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | +-------------+ | | | |
| | | +-----------------+ | | |
| | +---------------------+ | |
+---------------------------+ |
+-----------------------------+
```

### Understanding the CR options
Expand Down Expand Up @@ -131,7 +134,7 @@ The workload loops are nested as such from the CR options:
- 256KiB-4096KiB
```
- **numjobs**: (list) Number of clones of the job to run on each server -- Total jobs will be `numjobs * servers`
- **iodepth**: Number of I/O units to keep in flight against a file; see `fio(1)`
- **iodepth**: (list) Number of I/O units to keep in flight against a file; see `fio(1)`
- **read_runtime**: Amount of time in seconds to run `read` workloads (including `readwrite` workloads)
- **read_ramp_time**: Amount of time in seconds to ramp up `read` workloads (i.e., executing the workload without recording the data)
> Note: We intentionally run `write` workloads to completion of the file size specified in order to ensure
Expand Down
6 changes: 4 additions & 2 deletions roles/fio_distributed/templates/client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ spec:
{% for numjobs in workload_args.numjobs %}
{% for i in loopvar %}
{% for job in workload_args.jobs %}
cat /tmp/fio/fiojob-{{job}}-{{i}}-{{numjobs}}; mkdir -p /tmp/fiod-{{uuid}}/fiojob-{{job}}-{{i}}-{{numjobs}};
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}} \
{% for iodepth in workload_args.iodepth %}
cat /tmp/fio/fiojob-{{job}}-{{i}}-{{numjobs}}-{{iodepth}}; mkdir -p /tmp/fiod-{{uuid}}/fiojob-{{job}}-{{i}}-{{numjobs}}-{{iodepth}};
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}} \
{% if workload_args.debug is defined and workload_args.debug %}
-v \
{% endif %}
Expand All @@ -93,6 +94,7 @@ spec:
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}
echo run finished"
volumeMounts:
Expand Down
6 changes: 4 additions & 2 deletions roles/fio_distributed/templates/configmap.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ data:
{% endif %}
{% for i in loopvar %}
{% for job in workload_args.jobs %}
fiojob-{{job}}-{{i}}-{{numjobs}}: |
{% for iodepth in workload_args.iodepth %}
fiojob-{{job}}-{{i}}-{{numjobs}}-{{iodepth}}: |
[global]
{% if workload_args.kind is defined and workload_args.kind == "vm" %}
directory={{fio_path}}
Expand All @@ -76,7 +77,7 @@ data:
ioengine=libaio
size={{workload_args.filesize}}
{{loopvar_str}}={{i}}
iodepth={{workload_args.iodepth}}
iodepth={{iodepth}}
direct=1
numjobs={{numjobs}}

Expand All @@ -99,3 +100,4 @@ data:
{% endfor %}
{% endfor %}
{% endfor %}
{% endfor %}

0 comments on commit 39feb56

Please sign in to comment.