Despite low CPU utilization shown within VM, hypervisor CPU is highly utilized

Hello.

I’m running TrueNas Scale 25.04.2.4 on a system with an i5-1235U / 64GB of RAM. I have a virtual machine running Debian12, configured with the following settings:

virtual CPU = 1

Cores = 4

Threads = 1

CPU set = 4-7 (efficient cores are 2-9, performance cores are 0-1).

CPU pinning enabled

CPU mode = host passthrough

With most software running it seems all good. Negligible CPU utilization shown in the hypervisor as well as on the VM itself.

But when I run Minecraft, the VM shows low utilization while the hypervisor is showing the cores more or less max’d out.

See below - from VM:

From Hypervisor:

image

Question is, am I missing something? I don’t mind if the explanation is that the VM itself is showing wrong CPU metrics and it should instead be showing this. But it seems strange that there is such discrepancy. Feels like I have some config wrong, maybe the CPU pinning or so, but… if anyone has any ideas about this, please let me know.

One low-rent way to determine empirically if something is maxing out the cores is to

  1. Hook up a kill-a-watt and see if the power consumption increases with Minecraft
  2. Look at the reported CPU temps before and after starting Minecraft

Both should show change if cores are getting maxed out. In turn, you’ll know which CPU utilization reprting more likely reflects reality.

E cores come in sets of four sharing a cache; these should then be 2-5 and 6-9. Is there a reason why you’re pinning four cores across two complexes?

This is the info I’ve been looking for. I was looking for numa or such nodes for this CPU and couldn’t find it. So it’s not exactly like that but they may be segregated somehow.

EDIT: Sadly… I tried switching it and I can’t say it’s any better. I do feel a bit better about it but it’s just a personal feeling.

I suppose only way to truly test would be to run the mc server not in a VM on truenas but on truenas directly (or as an appliance)… but I do not really want to do that.

Any other ideas why the system would be taking such a performance hit from running on VM? Maybe it’s a java thing, I dunno…

Are you really running 4 cores on 1 thread in the VM? Truenas provides a linux template when setting up a VM which suggests 1 core on 1 thread–just saying.

This is not 4 cores on 1 thread.

virtual cpu = 1 means it’s just one CPU.

cores = 4 means it has four cores

threads = 1 means every core has 1 thread (i.e. no hyper-threading).

1 Like

Actually you were wrong.

0,1 is the 1st perf core, since it is hyperthreaded.

2,3 is the 2nd perf core, since it is hyperthreaded.

4 5 6 7 would be the “first complex”

8 9 10 11 would be the second.

So I had it set up properly…