VMmanager Knowledge Base
en En
es Es

How to increase disk performance in Windows VMs

Question

Virtual machines (VMs) running Windows OS exhibit low disk performance. This issue does not occur on Linux VMs.

How can disk performance be increased in Windows VMs?

Answer

You can improve performance by configuring I/O processing threads (iothreads). When all disks of a VM are handled by a single thread, a performance bottleneck occurs under high load. Configuring iothreads distributes disk load across multiple threads, thereby increasing performance.

Preparation

Before configuring iothreads, ensure that the latest VirtIO drivers (Balloon, NetKVM, Viostor) are installed on the Windows VM. Missing or outdated drivers are the most common cause of low performance. These drivers are not installed by default on Windows and must be installed separately. Configuring iothreads will not yield significant improvements without proper VirtIO drivers.

Configuring iothreads

To resolve the issue, configure iothreads:

  1. Stop the VM: navigate to Virtual MachinesMenu Stop.
  2. Connect to the cluster node via SSH. For more information about connecting via SSH, see Workstation setup.
  3. Identify the internal name of the target VM:
    virsh list --all | grep <VM_name>
    Example output
    virsh list --all | grep testtest
    460   5450_testtest    running

    Comment:

    • testtest — VM name;
    • 5450_testtest — internal VM name.
  4. Open the VM configuration:

    Warning
    Incorrectly modifying the configuration may render the VM inoperable. It is recommended to create a backup of the configuration before editing.
    virsh edit <internal_VM_name>
  5. Apply the following changes to the configuration:
    1. After the <vcpu> block, add the <iothreads> element with the desired number of threads. This number must not exceed the number of VM CPU cores.
      Example of iothreads configuration
      <vcpu placement='static'>4</vcpu>
      <iothreads>2</iothreads>
      Comment:
      • 4 — number of VM cores;
      • 2 — number of iothreads. 
    2. Assign threads to disks. In each disk section, add iothread='N', where N is the thread number. Distribute thread numbers based on the load of each disk.
      Example of assigning an iothread to a disk
      <driver name='qemu' type='qcow2' cache='none' io='native' iothread='1'/>

      Comment:

      • 1 — thread number assigned to the disk.
  6. Save the configuration.

Additional performance tuning

In QEMU versions prior to 9.0, only one thread can be assigned to a single disk. To further increase performance (especially for NVMe storage), enable multi-queuing using the queues parameter.

  1. Open the VM configuration:
    Warning
    Incorrectly modifying the configuration may render the VM inoperable. It is recommended to create a backup of the configuration before editing.
    virsh edit <internal_VM_name>
  2. Add the queues='2' parameter:
    Example of enabling multi-queue
    <driver name='qemu' type='qcow2' cache='none' io='native' iothread='1' queues='2'/>
    Comment:
    • queues='2' — number of processing queues. This allows the guest OS to send I/O requests in parallel and reduces lock contention in the driver. Related topics: