Skip to main content

Windows disk stress

Last updated on

Windows disk stress is a Windows chaos fault that drives disk IO on the target Windows VM by running NUMBER_OF_WORKERS IO worker processes that write MEMORY_CONSUMPTION MB to DISK_PATH (in BLOCK_SIZE_IN_KILOBYTES KB blocks with WRITE_PERCENTAGE percent writes) for DURATION, then stops the workers and cleans up the scratch files. The fault runs through the Windows chaos agent installed as a service on the target VM.

Use this fault to test how a workload on a Windows VM behaves when storage throughput is saturated: whether IO latency stays inside the SLA, whether databases queue writes correctly, and whether monitoring detects the saturation within the alerting SLA.

Run your first experiment

If you have not configured the chaos infrastructure yet, go to Quickstart to install the chaos infrastructure and run an experiment end to end.


Use cases

  • IO pressure on a Windows VM: When disk throughput saturates, does application latency stay inside the SLA?
  • Database resilience: Does the database queue writes correctly when fsync latency spikes?
  • Page-file impact: Does the workload survive when the page-file disk slows down?

Prerequisites

  • Windows chaos infrastructure: Install the chaos agent on the target VM. Go to Windows requirements and security considerations for prerequisites.
  • User privileges: Disk stress is an Advanced fault and requires administrator user.
  • Free space: DISK_PATH has enough free space to absorb MEMORY_CONSUMPTION MB of writes per worker.

Supported environments

PlatformSupport status
Windows Server VMs with the Windows chaos agent installedSupported
Linux VMsNot supported (use VMware IO stress or Linux disk fill)

Permissions required

This fault is classified as Advanced. The chaos agent must be installed with administrator privileges and the fault must run as an administrator user.


Fault tunables

Chaos parameters

TunableDescriptionDefault
DURATIONTotal duration of the fault as a Go duration string (for example 30s).30s
MEMORY_CONSUMPTIONAmount of data each worker writes in MB.1024
BLOCK_SIZE_IN_KILOBYTESBlock size used to fill the disk in KB.50
WRITE_PERCENTAGEPercentage of operations that are writes (0-100). The remainder are reads.100
NUMBER_OF_WORKERSNumber of IO worker processes.2
DISK_PATHPath on the Windows VM where workers write.C:\
RAMP_TIMEWait period in seconds before and after the fault.0

Tunables that apply to every fault are documented in common tunables for all faults.


Fault execution in brief

The Windows chaos agent on the target VM launches NUMBER_OF_WORKERS IO workers that read/write MEMORY_CONSUMPTION MB under DISK_PATH in BLOCK_SIZE_IN_KILOBYTES KB blocks (with WRITE_PERCENTAGE percent writes) for DURATION, then stops the workers and removes the scratch files.


Expected behavior during fault execution

  • Disk read/write throughput on DISK_PATH saturates.
  • Application IO latency may rise.
  • Performance Monitor PhysicalDisk\Avg. Disk Queue Length reflects the activity.
  • After the duration ends, the workers exit and the scratch files are removed.
When the fault ends

The chaos agent stops the IO workers and removes the scratch files. IO latency returns to baseline within seconds.

Signals to watch


Verify the fault execution effect

  1. Open Resource Monitor → Disk.

    You should see the chaos worker process writing to DISK_PATH at the configured throughput during the window.

  2. Run Get-Counter '\PhysicalDisk(*)\Avg. Disk Queue Length' -Continuous in PowerShell.

    Queue length on the target disk should rise during the chaos window.


Recovery and cleanup

  • End of duration: The chaos agent stops the workers and removes the scratch files.
  • Abort: Stopping the experiment also stops the workers and cleans up.
  • Manual recovery: Delete any leftover scratch files under DISK_PATH if cleanup failed.

Limitations

  • Disk full risk: Setting MEMORY_CONSUMPTION * NUMBER_OF_WORKERS close to free space can fill the disk before the fault ends.
  • System drive risk: Stressing the system drive (C:\) can affect the OS itself; consider using a non-system drive.
  • Administrator required: This is an Advanced fault and requires the agent to run as administrator.

Troubleshooting

Windows disk stress fails with not enough space on disk in Harness Chaos Engineering

DISK_PATH does not have enough free space for MEMORY_CONSUMPTION * NUMBER_OF_WORKERS. Check free space (Get-PSDrive) and either reduce the request or target a roomier disk.

Windows disk stress fails with access denied

The chaos agent must be installed and running with administrator privileges for advanced faults like Disk stress. Reinstall the agent as administrator and retry.