Skip to main content

VMware IO stress

VMware IO stress causes disk stress on the target VMware VMs. It aims to verify the resilience of applications that share this disk resource with the VM.

VMware IO Stress

Use cases

  • VMware IO stress determines the resilience of an application to unexpected spikes in resources.
  • It determines how well an application handles unexpected I/O stress.
  • It simulates slower disk operations by the application.
  • It simulates noisy neighbour problems by hogging the disk bandwidth.
  • It verifies the disk performance on increasing I/O threads and varying I/O block sizes.
  • It checks whether the application functions well under high disk latency conditions.
  • It checks for high I/O traffic that includes large I/O blocks, and in what cases other services monopolize the I/O disks.
note
  • Kubernetes > 1.16 is required to execute this fault.
  • Execution plane should be connected to vCenter and host vCenter on port 443.
  • The VM should be in a healthy state before and after injecting chaos.
  • VMware tool should be installed on the target VM with remote execution enabled.
  • Appropriate vCenter permissions should be provided to access the hosts and the VMs.
  • Kubernetes secret has to be created that has the Vcenter credentials in the CHAOS_NAMESPACE. VM credentials can be passed as secrets or as a ChaosEngine environment variable. Below is a sample secret file:
apiVersion: v1
kind: Secret
metadata:
name: vcenter-secret
namespace: litmus
type: Opaque
stringData:
VCENTERSERVER: XXXXXXXXXXX
VCENTERUSER: XXXXXXXXXXXXX
VCENTERPASS: XXXXXXXXXXXXX

Fault tunables

Mandatory fields

Variables Description Notes
VM_NAME Name of the target VM. For example, ubuntu-vm-1.

Optional fields

Variables Description Notes
FILESYSTEM_UTILIZATION_PERCENTAGE Specify the size as a percentage of free space on the file system. For example, 40. For more information, go to file system utilization percentage.
FILESYSTEM_UTILIZATION_BYTES Specify the size in gigabytes(GB). FILESYSTEM_UTILIZATION_PERCENTAGE and FILESYSTEM_UTILIZATION_BYTES environment variables are mutually exclusive. If both are provided, FILESYSTEM_UTILIZATION_PERCENTAGE takes precedence. For example, 100. For more information, go to file system utilization bytes.
NUMBER_OF_WORKERS Number of I/O workers involved in I/O disk stress. Defaults to 4. For more information, go to workers for stress.
VOLUME_MOUNT_PATH Location that points to the volume mount path used in I/O stress. For example, /Users/admin/disk-02. For more information, go to mount path.
CPU_CORES Number of CPU cores that are subject to CPU stress. Defaults to 1. For more information, go to CPU cores.
TOTAL_CHAOS_DURATION Duration that you specify, through which chaos is injected into the target resource (in seconds). Defaults to 30s. For more information, go to duration of the chaos.
CHAOS_INTERVAL Time interval between two successive instance terminations (in seconds). Defaults to 30s. For more information, go to chaos interval.
SEQUENCE Sequence of chaos execution for multiple instances. Defaults to parallel. Supports serial sequence as well. For more information, go to sequence of chaos execution.
RAMP_TIME Period to wait before and after injecting chaos (in seconds). For example, 30s. For more information, go to ramp time.

Filesystem utilization percentage

It specifes the size as a percentage of free space on the file system. Tune it by using the FILESYSTEM_UTILIZATION_PERCENTAGE environment variable.

Use the following example to tune it:

# io-stress in the VMware VM
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
chaosServiceAccount: litmus-admin
experiments:
- name: VMware-io-stress
spec:
components:
env:
# Name of the VM
- name: VM_NAME
value: 'test-vm-01'
# percentage of free space of file system, need to be stressed
- name: FILESYSTEM_UTILIZATION_PERCENTAGE
value: '10'

Filesystem utilization bytes

It specifies the amount of free space on the file system in gigabytes(GB). Tune it by using the FILESYSTEM_UTILIZATION_BYTES environment variable. FILESYSTEM_UTILIZATION_BYTES is mutually exclusive with the FILESYSTEM_UTILIZATION_PERCENTAGE environment variable. If both FILESYSTEM_UTILIZATION_PERCENTAGE and FILESYSTEM_UTILIZATION_BYTES environment variables are set, FILESYSTEM_UTILIZATION_PERCENTAGE takes precendence.

Use the following example to tune it:

apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
chaosServiceAccount: litmus-admin
experiments:
- name: VMware-io-stress
spec:
components:
env:
# Name of the VM
- name: VM_NAME
value: 'test-vm-01'
# size of io to be stressed
- name: FILESYSTEM_UTILIZATION_BYTES
value: '1' #in GB

Mount path

It specifies the location that points to the volume mount path used in I/O stress. Tune it by using the VOLUME_MOUNT_PATH environment variable.

Use the following example to tune it:

# io-stress in the VMware VM
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
chaosServiceAccount: litmus-admin
experiments:
- name: VMware-io-stress
spec:
components:
env:
# Name of the VM
- name: VM_NAME
value: 'test-vm-01'
# path need to be stressed/filled
- name: VOLUME_MOUNT_PATH
value: '/some-dir-in-container'
# size of io to be stressed
- name: FILESYSTEM_UTILIZATION_BYTES
value: '1' #in GB

Workers for stress

It specifies the worker's count for stress. Tune it by using the NUMBER_OF_WORKERS environment variable. Use the following example to tune it:

# io-stress in the VMware VM
apiVersion: litmuschaos.io/v1alpha1
kind: ChaosEngine
metadata:
name: engine-nginx
spec:
engineState: "active"
chaosServiceAccount: litmus-admin
experiments:
- name: VMware-io-stress
spec:
components:
env:
# Name of the VM
- name: VM_NAME
value: 'test-vm-01'
# number of io workers
- name: NUMBER_OF_WORKERS
value: '4'
# size of io to be stressed
- name: FILESYSTEM_UTILIZATION_BYTES
value: '1' #in GB