cloudbase / windows-imaging-tools

Tools to automate the creation of a Windows image for OpenStack, supporting KVM, Hyper-V, ESXi and more.
Apache License 2.0
680 stars 227 forks source link

Windows 10 super slow I/O #373

Open ehsankhodayar opened 1 year ago

ehsankhodayar commented 1 year ago

I have created a Windows 10 Pro using windows-imaging-tools. After running a new VM based on this image, the Disk activation time is always 100%, while the VM is not running any special service. I am using OpenStack Yoga on a baremetal server with a KVM hypervisor. It works fine when I run a VM using the same image file and VirtualBox.

I also allocated more resources to the OpenStack VM, but nothing changed.

image image

ader1990 commented 1 year ago

Hello,

From the task manager, I can see that Windows Update might be the process hogging the IO resources.

ehsankhodayar commented 1 year ago

Hi @ader1990, When I check processes, I don't find a particular I/O-intensive process that causes this problem. However, a few days ago, I noticed one issue. The server I am working on has around 230 GB of storage for the root partition and 9 TB of storage for the opt partition where the OpenStack is located. I noticed when I ran the VM using VirtualBox in the root partition it worked fine. But when I ran the same VM on the opt partition, it was as slow as OpenStack. I think the problem is from opt partition. This partition has a raid six configuration. Do you know what can cause this issue? I have this problem with running even one VM in the opt directory.

ader1990 commented 1 year ago

I usually test the storage IO with a simple command: dd. On Windows, it comes with the git environment.

NOTE: dd command is very distructive if not used correctly, as it wipes the file as value for the argument "of", use it at your own risk.

The code bellow is an incomplete example, as you need to change the path "C:\tmp\" according to your environment.

For sequential IO, from PowerShell:

mkdir C:\tmp
& "C:\Program Files\Git\usr\bin\dd.exe" if=/dev/zero of=C:\tmp\output-8MB.img bs=8MB count=500 oflag=dsync

I get around 650MB/s on a good NVME SSD.

For random IO, from PowerShell:

mkdir C:\tmp
& "C:\Program Files\Git\usr\bin\dd.exe" if=/dev/zero of=C:\tmp\output-4KB.img bs=4KB count=500 oflag=dsync

I get around 25MB/s on a good NVME SSD.

You can compare the two disks easily this way.