Linux disk IO stress
Linux disk IO stress applies stress on the disk of the target Linux machines over I/O operations for a specific duration.
Use cases
- Simulates slower disk operations for the applications.
- Simulates noisy neighbour problems by exhausting the disk bandwidth.
- Verifies the disk performance on increasing I/O threads and varying I/O block sizes.
- Checks how the application functions under high disk latency conditions, when I/O traffic is high and includes large I/O blocks, and when other services monopolize the I/O disks.
- This fault can be executed on Ubuntu 16 or higher, Debian 10 or higher, CentOS 7 or higher, RHEL 7 or higher, and openSUSE LEAP 15.4 or higher.
- The
linux-chaos-infrastructure
systemd service should be in an active state, and the infrastructure should be inCONNECTED
state.
Fault tunables
Optional tunables
Tunable | Description | Notes |
---|---|---|
fileSystemUtilisationBytes | File size consumed for the disk I/O operations (in bytes). | Mutually exclusive with fileSystemUtilisationPercentage |
fileSystemUtilisationPercentage | File size consumed during the disk I/O operations (in percentage of the total available disk size). | Mutually exclusive with fileSystemUtilisationBytes . Default: 10% |
workers | Number of worker processes to start. | Default: 1 |
volumeMountPath | Volume mount path used for the disk I/O operations. | Default: user HOME directory |
duration | Duration through which chaos is injected into the target resource (in seconds). | Default: 30 s |
rampTime | Period to wait before and after injecting chaos (in seconds). | Default: 0 s |
Workers
The workers
input variable utilizes a specific number of workers during the disk I/O stress.
The following YAML snippet illustrates the use of this environment variable:
# workers to utilize
apiVersion: litmuchaos.io/v1alpha1
kind: LinuxFault
metadata:
name: linux-disk-io-stress
labels:
name: disk-io-stress
spec:
stressChaos/inputs:
workers: 1
fileSystemUtilisationPercentage: 10
File system utilization in bytes
The fileSystemUtilisationBytes
input variable utilizes a specific amount of file system disk space or bandwidth as a part of the disk I/O operations in bytes.
The following YAML snippet illustrates the use of this environment variable:
# file system amount to be utilized
apiVersion: litmuchaos.io/v1alpha1
kind: LinuxFault
metadata:
name: linux-disk-io-stress
labels:
name: disk-io-stress
spec:
stressChaos/inputs:
workers: 3
fileSystemUtilisationBytes: 10000
File system utilization in percentage
The fileSystemUtilisationPercentage
input variable utilizes a specific amount of file system disk space or bandwidth as a part of the disk I/O operations in terms of percentage of the total available disk space.
The following YAML snippet illustrates the use of this environment variable:
# file system percentage to be utilized
apiVersion: litmuchaos.io/v1alpha1
kind: LinuxFault
metadata:
name: linux-disk-io-stress
labels:
name: disk-io-stress
spec:
stressChaos/inputs:
workers: 3
fileSystemUtilisationPercentage: 70
Volume mount path
The volumeMountPath
input variable utilizes the volume mount path where the disk I/O operations are performed.
The following YAML snippet illustrates the use of this environment variable:
# configure volume mount path
apiVersion: litmuchaos.io/v1alpha1
kind: LinuxFault
metadata:
name: linux-disk-io-stress
labels:
name: disk-io-stress
spec:
stressChaos/inputs:
workers: 1
fileSystemUtilisationPercentage: 50
volumeMountPath: "/tmp"