Sluggish VM ?

panzerscope

Contributor
Joined
May 30, 2022
Messages
146
Hello all,

I am running TrueNAS-SCALE-22.02.2.1

I have a Windows 10 X64VM Running that has 1 CPU (16 Cores), 16GB RAM allocated to it and this VM is running off of an SSD. When installing this VM I used the VirtIO setup as I hear that has better performance than AHCI.

The issue I am facing is that the VM seems, well sort of sluggish. Slow to respond. I have checked Task Manager within the VM and barely any resources are being used. I also checked the current stats of the TrueNas host, again more than enough horsepower. So nothing comes up as an immediate cause.

Has anyone experienced this ? Is this just the nature of the beast at the moment with virtualisation within TrueNas Scale ?

Thanks,
P
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
I have a Windows 10 X64VM Running that has 1 CPU (16 Cores)
If I understand correctly, you have a 16-core VM.

Putting aside "do you need that many cores in a VM?" how many cores are on your host?

I'm not sure how well KVM's scheduler handles co-scheduling, but I would start by reducing the core count to something more reasonable like 2 or 4.
 

ASiC

Dabbler
Joined
Jun 21, 2022
Messages
12
Hello all,

I am running TrueNAS-SCALE-22.02.2.1

I have a Windows 10 X64VM Running that has 1 CPU (16 Cores), 16GB RAM allocated to it and this VM is running off of an SSD. When installing this VM I used the VirtIO setup as I hear that has better performance than AHCI.

The issue I am facing is that the VM seems, well sort of sluggish. Slow to respond. I have checked Task Manager within the VM and barely any resources are being used. I also checked the current stats of the TrueNas host, again more than enough horsepower. So nothing comes up as an immediate cause.

Has anyone experienced this ? Is this just the nature of the beast at the moment with virtualisation within TrueNas Scale ?

Thanks,
P
Hi,

I had a similar issue in the past (TrueNAS Core) and was struggling to find out the root cause.
The VM was running on a zvol from a RAIDZ1 pool on SSDs.

It ended up to be the SSDs: For some reason the 512GBx3 Crucial SSDs had awfull response times.
I replaced all of them with WD Blue and the issue sorted.

Currently on TrueNAS Scale I'm using 2 mirrored WD Blue NVMEs and the VMs are running without issues.

Regards,
A
 

panzerscope

Contributor
Joined
May 30, 2022
Messages
146
Thanks guys for the responses.

So for the TrueNas host the specs are

2x Intel(R) Xeon(R) CPU E5-2696 v4 @ 2.20GHz (44 Cores/88 Threads)
128GB ECC RAM

The SSD's used for the VM are 2x 1TB Seagate Firecuda (Mirrored). While these are not NVME drives, they are not particularly slouchy so I would have been surprised if they are to blame. Not saying its impossible though. NVMe are obviously far superior.

While running some basic sync tasks on the VM this is my disk activity as reported by Windows

1658420427037.png


During the same time TrueNas report my SSD disk activity the below

1658420586424.png


I had allocated more CPU cored to the instance as I was also using a schedule 7Zip archiving activity, it is to be said this is not running, and is not the cause of any sluggishness. I could try lowering the core count to see if that helps with any performance issues.

I could purchase an NVMe setup but would rather not if I can at all avoid it.

This was an interesting read as someone else was having the same issue : https://www.reddit.com/r/truenas/comments/voi74z/truenas_scale_win10_vms_unusably_slow/

However in summary they put

UPDATE:

I'm not sure if this solved all the slowness/lagginess, but if you configure the TrueNAS local apps to use a pool (I had never set it up on this server the second time I loaded TrueNAS) suddenly makes VM's run about 400% faster (even withoout rebooting the VM's). Unsetting the local apps to not use a pool makes the VM's run slow again, so it's reproduceable and directly tied to that. I'm not sure if it's a bug or what, the local apps should have zero affect on the VM's.

That sounds bizzare ? My Local apps are actually set to use my SSD's, which is where the VM also runs from. But I would not expect the local apps to cause such lag.

Thanks guys.
 
Last edited:

panzerscope

Contributor
Joined
May 30, 2022
Messages
146
An update.

I recently installed a Samsung 980 Nvme into the system and I have moved the VM from my SSD onto that to see if there was any difference. There however is no noticeable difference.

So I downloaded and ran CrystalDiskMark and ran:

1658920798713.png


Not really the performance I was expecting.

I have installed the latest drivers within windows as per: https://fedorapeople.org/groups/vir...ownloads/archive-virtio/virtio-win-0.1.221-1/

But still feels sluggish. Perhaps I used the wrong drivers during initial Windows install as the my VirtIO HDD drivers show as:

1658921937373.png


Any ideas ?
 

diogen

Explorer
Joined
Jul 21, 2022
Messages
72
I believe the root of the sluggishness is the video (graphics) not storage subsystem.

What graphics adapter does your Windows VM use? VirtIO driver as well?
Do you have a discrete graphics card?

I recall using two Windows VMs on "siblings" QNAP boxes: TS-673 and TVS-673e. Both used VirtIO graphics/storage drivers.
The second box has a CPU with built-in graphics, the first does not.

The Windows VM performance (responsiveness) between those two boxes was day and night.

Install a graphics card, pass it to the Windows VM and the problem should go away...
 
Last edited:

panzerscope

Contributor
Joined
May 30, 2022
Messages
146
I believe the root of the sluggishness is the video (graphics) not storage subsystem.

What graphics adapter does your Windows VM use? VirtIO driver as well?
Do you have a discrete graphics card?

I recall using two Windows VMs on "siblings" QNAP boxes: TS-673 and TVS-673e. Both used VirtIO graphics/storage drivers.
The second box has a CPU with built-in graphics, the first does not.

The Windows VM performance (responsiveness) between those two boxes was day and night.

Install a graphics card, pass it to the Windows VM and the problem should go away...
Hey .

Yes the GPU uses a VirtIO driver. However I cannot select a GPU to pass through as I get an error as per the below.

Screenshot_2022-07-29-22-27-51-14_fc90557b4939f0bdf6f556efb0a965c9.jpg


Unless I am doing something wrong?
 

diogen

Explorer
Joined
Jul 21, 2022
Messages
72
I think this is work in progress...
 

panzerscope

Contributor
Joined
May 30, 2022
Messages
146
I think this is work in progress...
Understood. Looks like a limitation I will just have to wait and see if it is overcome. Thanks for letting me know. I think you are right that some of the sluggishness us down to lack of GPU acceleration.
 
Top