Red HatElvir KuricTutorial
How to run I/O workloads on OpenShift Virtualization VMs
Summary
Testing I/O performance at scale across multiple OpenShift Virtualization VMs is challenging due to scattered SSH sessions and ad hoc scripts. The fio-container harness turns multi-VM FIO into a single, repeatable container run using a Python orchestration script. It supports both pre-created VMs and on-demand provisioning (CREATE_VMS=true) for Linux guests based on Fedora or RHEL. The harness handles storage preparation, FIO installation, data pre-write, and cleanup, and collects per-VM JSON results into a single mounted directory. Results can be analyzed with provided Python scripts to generate IOPS and bandwidth graphs for comparing StorageClass configurations or cluster changes.
Context
Testing I/O performance at scale across multiple VMs on OpenShift Virtualization is challenging because of scattered SSH sessions, ad hoc scripts, and difficulty coordinating start times and collecting results. The fio-container harness solves this by turning multi-VM FIO into a single, repeatable container run.
Approach / What changed
The harness uses a containerized Python orchestration script (fio-tests.py) that accepts a YAML configuration file or environment variables, connects to VMs via virtctl ssh, optionally provisions VMs (CREATE_VMS=true), prepares storage, installs FIO, pre-writes data, runs the FIO matrix in parallel, and collects per-VM JSON results into a single mounted directory.
Takeaways
The fio-container harness runs the same FIO matrix across many OpenShift Virtualization guests in parallel with coordinated start, wait, and result collection, replacing hand-driven SSH sessions and ad hoc scripts.
On-demand VM provisioning (CREATE_VMS=true) generates ephemeral SSH keys, creates DataVolumes and VMs, waits for SSH access, and runs the full FIO workflow in a single command without requiring pre-created VMs.
The harness supports both OS disk (–testdir) and dedicated data disk modes, and can benchmark non-OpenShift hosts (bare-metal, KVM, VMware) using SSH_ONLY mode with a hosts.txt file.
FAQ
How do I provision VMs automatically for a FIO run?
Set CREATE_VMS=true and leave HOST_PATTERN and HOSTS empty. The container generates an ephemeral SSH key, creates DataVolumes and VMs, waits for SSH access, prepares storage, installs FIO, pre-writes data, runs the benchmark, and optionally cleans up with CLEANUP=true.
Can I benchmark non-OpenShift hosts like bare-metal or VMware?
Use SSH_ONLY=true and provide a hosts.txt file with hostnames or IPs, plus a fio-ssh-hosts.yaml that maps each host to its data disk device (e.g., sdb or vdb). Mount the bastion's SSH private key into the container. The namespace is ignored in SSH_ONLY mode.
How are FIO results collected and analyzed?
Results are per-VM JSON files collected into a single mounted directory on the bastion. The ioscale repository provides analyzer scripts (e.g., analyze_bw_mean_with_graphs.py) that generate IOPS and bandwidth graphs for single runs or comparisons across multiple runs.
Source and freshness
- Source
- developers.redhat.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.