The FIO I/O workload playbook is workloads/fio.yml
and will run the FIO I/O workload on your cluster.
FIO I/O workload test is designed to stress storage backend used by
application pods. FIO I/O workload test supports all FIO test types : seq read /
write, random read/write, randrw, rw.
Requirements:
- Working storage backend and working storage class
FIO I/O test will use dynamic provisioning to allocate PVC and attach it to Pod so it requirement to have working storage class prior starting this test.
PBENCH_SERVER
variable to set to valid pbench server
How to setup pbench server is described in pbench documentation
Running from CLI:
$ cp workloads/inventory.example inventory
$ # Add orchestration host to inventory
$ # Edit vars in workloads/vars/fio.yml or define Environment vars (See below)
$ time ansible-playbook -vv -i inventory workloads/fio.yml
Default: `` Elasticsearch server host address (currently used by snafu), set to index results from cluster loader
Default: `` Elasticsearch server port (currently used by snafu), set to index results from cluster loader
Default: snafu
Elasticsearch server index prefix (currently used by snafu)
Default: scale-ci
user running the tests, used for identifying test results.
Default: (defaults to the clustername in the machineset) clustername on which the tests are running, used for identifying test results.
Default: ~/.ssh/id_rsa.pub
Public ssh key file for Ansible.
Default: ~/.ssh/id_rsa
Private ssh key file for Ansible.
Default: root
User for Ansible to log in as. Must authenticate with PUBLIC_KEY/PRIVATE_KEY.
Default: quay.io/openshift-scale/scale-ci-workload
Container image that runs the workload script.
Default: false
Enables/disables the node selector that places the workload job on the workload
node.
Default: false
Enables/disables the toleration on the workload job to permit the workload
taint.
Default: false
Enables/disables running the workload pod as privileged.
Default: ~/.kube/config
Location of kubeconfig on orchestration host.
Default: false
Enables/disables the collection of pbench data on the pbench agent Pods. These Pods are deployed by the tooling playbook
and if this option is enabled then tooling playbook needs to be executed prior to this test.
Default: true
Enables/disables the copying of pbench data to a remote results server for further analysis.
As of now, this test requires valid PBENCH_SERVER
where it will copy results at end of test.
Default: ~/.ssh/id_rsa
Location of ssh private key to authenticate to the pbench results server.
Default: ~/.ssh/id_rsa.pub
Location of the ssh public key to authenticate to the pbench results server.
Default: There is no public default.
DNS address of the pbench results server.
Default: There is no public default.
Future use for pbench and prometheus scraper to place results into git repo that holds results data.
Default: 10000
Number of retries for Ansible to poll if the workload job has completed.
Poll attempts delay 10s between polls with some additional time taken for each polling action depending on the orchestration host setup.
FIO I/O test for many pods and big file sizes can run for hours and either we rise JOB_COMPLETION_POLL_ATTEMPTS
to
higt value, or remove fully checking for JOB_COMPLETION_POLL_ATTEMPTS
for FIO I/O test.
Default: false Set it to true when running OCP on Azure.
Default: '' Path to the Azure auth file - terraform.azure.auto.tfvars.json found in the openshift install dir on the orchestration host i.e scale-ci-deploy/scale-ci-azure/terraform.azure.auto.tfvars.json.
Default: fiotest
Prefix to use for FIO I/O test
Default: true
If set to true
test project will be removed at end of test.
Default: fiotest
Basename used by cluster loader for the project(s) it creates.
Default: 1
Maximum number of Pods that FIO I/O test will create for test
Default: quay.io/openshift-scale/scale-ci-fio:latest
Container image to use for FIO Pods
Default: 1
Number of Pods for cluster loader will create before waiting for Pods to become running.
Default: 0
Period of time (in seconds) for cluster loader to pause after creating Pods and waiting for them to be "Running" state.
When FIOTEST_PAUSE
is zero, cluster loader will create pods in fastest possible manner.
Default: 2Gi
FIOTEST_STORAGE_SIZE
defines size of PVC which will be created and mounted to Pod. It is important to notice that this
cannot be smaller than FIOTEST_FILESIZE
Default: ``
This parameter defines what storageclass to use to dynamically allocate PVC. It is expected that storage class is present and functional in order for test to work. Storage class name will be different and depends on environment, common storage class names are
- AWS - gp2
- Azure - managed-premium
- OSP - standard
- CEPH - csi-cephfs/csi-rbd
Default: ReadWriteOnce
FIOTEST_ACCESS_MODES
is responsible for PVC access mode. This parameter will accept one of ReadWriteOnce
,
ReadWriteMany
or ReadOnlyMany
. It is important to understand that particular access mode must be supported
by storage used for test.
Default: 4
Fio block size.
Default: /mnt/pvcmount/f2
FIO file to write. PVC is mounted inside FIO pod to /mnt/pvcmount
and thus inside this mount point fio file is
created. This ensures that I/O operations are executed against PVC.
Default: 1GB
FIO file size and its size cannot exceed FIOTEST_STORAGE_SIZE
.
Default: 60
FIO test runtime
Default: 1
From man fio
- If value is true, use non-buffered I/O.
This is usually O_DIRECT.
Default: 1
Number of I/O units to keep in flight against the file
Default: read
FIO test type to execute. Default is read
, supported are : read,write,randread,randwrite,randrw,rw
Default: 1
Running one iteration of test can give misleading results, and it is recommended to run multiple iterations to catch up deviations and anomalies. Test result will show best iteration.
Default: ""
For cases when it is necessary to have FIO pods to be assigned to already labeled nodes with specific label
FIOTEST_NODESELECTOR
allows to specify desired label.
FIO I/O test does not label nodes, it expect that labels are already assigned to nodes.
FIOTEST_PREFIX=fiotest
FIOTEST_CLEANUP=true
FIOTEST_BASENAME=fiotest
ENABLE_PBENCH_COPY=true
FIOTEST_MAXPODS=1
FIOTEST_POD_IMAGE="quay.io/openshift-scale/scale-ci-fio"
FIOTEST_STEPSIZE=1
FIOTEST_PAUSE=0
FIOTEST_STORAGE_SIZE="2Gi"
FIOTEST_STORAGECLASS=gp2
FIOTEST_ACCESS_MODES="ReadWriteOnce"
FIOTEST_BS=4
FIOTEST_FILENAME="/mnt/pvcmount/f2"
FIOTEST_FILESIZE="1GB"
FIOTEST_RUNTIME=600
FIOTEST_DIRECT=1
FIOTEST_IODEPTH=1
FIOTEST_TESTTYPE=write
FIOTEST_SAMPLES=1
For combination with many test pods and FIO file size in range of GBs - FIO I/O test can take long to finish and it can
happen that JOB_COMPLETION_POLL_ATTEMPTS
expires before test is done. JOB_COMPLETION_POLL_ATTEMPTS
is increased to
10000 what does not affect test duration. It is necessary to to decide is JOB_COMPLETION_POLL_ATTEMPTS
relevant for
FIO I/O test and can it be fully ignored.