Slow VM's on TrueNAS SCALE

WikingDK

Dabbler
Joined
Aug 3, 2023
Messages
10
Hi there.
So I'm quite a novice at TrueNAS SCALE, but not in virtual servers.
I have TrueNAS i just build, following specs:
CPU: AMD Ryzen 7 3700X
RAM: 48GB
Motherboard: MSI Tomahawk b450 MAX (Running the newest BIOS)
SSD: 2x1TB WD Red in RAID1.

As I'm quite new in TrueNAS, i created a VM just for testing, and the VM is extreamly slow.
So, i seached the net, and found drivers for VirtIO, and changed drives and NIC to VirtIO.
Also i tried with and without CPU "Host Passthru".

But the VM is still sluggish.
The VM is Windows 10, i tried diffrent CPU configurations with CPU's, threads and threds, same issues.
6G RAM, not using all of it.

In the VM, i see that task manager uses nearly 100% CPU on all cores at the same time.
So i went to the dashboard, and i find that CPU core 4 is at 100%, all other cores are practicaly at zero.
I started Googling the "Only one CPU used" and found many issues with older Intel server CPU's that had a limit.

Can anyone here give input, on what I'm missing?
 

WikingDK

Dabbler
Joined
Aug 3, 2023
Messages
10
I forgot to attach photos of the CPU usage, i think it looks weird.
 

Attachments

  • TrueNAS CPU.png
    TrueNAS CPU.png
    10.8 KB · Views: 145
  • VM CPU.png
    VM CPU.png
    17.3 KB · Views: 173

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
What are the settings for the VM? CPUs, Cores, Threads?
 

WikingDK

Dabbler
Joined
Aug 3, 2023
Messages
10
What are the settings for the VM? CPUs, Cores, Threads?
Hi Sretalla.
As I wrote, i have tried a lot of diffrent configurations. But my current settings is CPU 2, cores 2 and threds 2.

50GB SSD drive.
And 8GB RAM.

There is also running a pihole. But that is all running on the machine.

Jens.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
CPU 2, cores 2 and threds 2
OK, but you see that this makes 8 threads right?

It's usually not good to use more than 1 CPU.

2 cores and 2 threads would mean 4 threads in total and that's probably a good place to start from to see if things work well.
 

WikingDK

Dabbler
Joined
Aug 3, 2023
Messages
10
OK, but you see that this makes 8 threads right?

It's usually not good to use more than 1 CPU.

2 cores and 2 threads would mean 4 threads in total and that's probably a good place to start from to see if things work well.
Yehar i know.
And i have tried a lot of other configs.
OK, but you see that this makes 8 threads right?

It's usually not good to use more than 1 CPU.

2 cores and 2 threads would mean 4 threads in total and that's probably a good place to start from to see if things work well.
Aaaaah, i found it!

The option for "Optional: CPU Set (Examples: 0-3,8-11)" i had set it to 4, and when doing that you only allow it running on CPU 4.
When i press the questionmark to see what the option is, it doesent show my any info, so a Google of that option. Bingo.
I now have a speed monster!
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
The other thing that accelerated my Windows 10 VM is hyper-v enlightenments turned on.

I use this guide for pinning:

 
Last edited:

lesserthere

Dabbler
Joined
Aug 10, 2023
Messages
39
Yehar i know.
And i have tried a lot of other configs.

Aaaaah, i found it!

The option for "Optional: CPU Set (Examples: 0-3,8-11)" i had set it to 4, and when doing that you only allow it running on CPU 4.
When i press the questionmark to see what the option is, it doesent show my any info, so a Google of that option. Bingo.
I now have a speed monster!
I might just try Scale again on bare metal and spin up windows. I gave up and had results just as you described. Ended up with scale on proxmox and windows vm on proxmox all working great.
I have a spare dell i7 7700 I will try again with your tips. My main server I wanted to put it on is an amd ryzen 3400g with 64gb ram, asrock B550 pro-4 mobo

Here no? You just populated it with '4'?

1692295593168.png

Thanks
 

WikingDK

Dabbler
Joined
Aug 3, 2023
Messages
10
I might just try Scale again on bare metal and spin up windows. I gave up and had results just as you described. Ended up with scale on proxmox and windows vm on proxmox all working great.
I have a spare dell i7 7700 I will try again with your tips. My main server I wanted to put it on is an amd ryzen 3400g with 64gb ram, asrock B550 pro-4 mobo

Here no? You just populated it with '4'?

View attachment 69390
Thanks
Yes there. With the number 4 it obly uges that one core!

Jens.
 

lesserthere

Dabbler
Joined
Aug 10, 2023
Messages
39
Yes there. With the number 4 it obly uges that one core!

Jens.
great I'll give it another shot thanks. I run blueiris on the windows. It is running all ok on proxmox right now but with truenas scale as a vm also, and received a lot of criticism for doing this.
 

lesserthere

Dabbler
Joined
Aug 10, 2023
Messages
39
If I set cpu set to just '4' this is pegged at 100% at start up then settles down with 2/2/2 also.
Will experiment
 

lesserthere

Dabbler
Joined
Aug 10, 2023
Messages
39
What would be a good config in terms of vcpu, cores and threads here?
Still a lot more lag and cpu usage than on proxmox with a very light version in terms of resources assigned

1692302202791.png



1692302867458.png
 
Last edited:

lesserthere

Dabbler
Joined
Aug 10, 2023
Messages
39
Made improvements and cpu usage is much lower now.
Disabled a lot windows services like the defender scanning the C drive and some of the firewall settings, Cleaned it out as much as I could and appears to run better now
 

neofusion

Contributor
Joined
Apr 2, 2022
Messages
159
Hi there.
So I'm quite a novice at TrueNAS SCALE, but not in virtual servers.
I have TrueNAS i just build, following specs:
CPU: AMD Ryzen 7 3700X
RAM: 48GB
Motherboard: MSI Tomahawk b450 MAX (Running the newest BIOS)
SSD: 2x1TB WD Red in RAID1.

As I'm quite new in TrueNAS, i created a VM just for testing, and the VM is extreamly slow.
So, i seached the net, and found drivers for VirtIO, and changed drives and NIC to VirtIO.
Also i tried with and without CPU "Host Passthru".

But the VM is still sluggish.
The VM is Windows 10, i tried diffrent CPU configurations with CPU's, threads and threds, same issues.
6G RAM, not using all of it.

In the VM, i see that task manager uses nearly 100% CPU on all cores at the same time.
So i went to the dashboard, and i find that CPU core 4 is at 100%, all other cores are practicaly at zero.
I started Googling the "Only one CPU used" and found many issues with older Intel server CPU's that had a limit.

Can anyone here give input, on what I'm missing?
Running TrueNAS on drives in a hardware RAID configuration (RAID1) is not recommended.
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
Running TrueNAS on drives in a hardware RAID configuration (RAID1) is not recommended.
He probably used the term "raid" to mean ZFS mirror. A lot of people here use the term RAID when describing zfs vdevs, which is not the same thing.
 

lesserthere

Dabbler
Joined
Aug 10, 2023
Messages
39
after moving to unraid I found the vms work sooo much better.
Span up a win 11 tiny with 4gb ram 1 core and is speedy compared to truenas.
Unraid has so many advantages over truenas for the home user.
Well worth the extra cost imho
 
Top