Why is the generic x86-64 installation consuming more cpu than having it installed as a VM?

Hi,

I had HA installed on an old windows machine on a VM. Windows was giving me issues and I wasn’t using the machine for anything else so I removed the Windows HDD and just installed the HA directly onto a SSD using the Generic x86-64 method. It has been running great now for a couple of days but when viewing the CPU usage I see that it is constantly in higher use compared to when it was running as a VM? I thought it would be the other way around? Is it just that the VM couldn’t measure it correctly or something? Before the move it was about 5% usage and after the move it is about 10% usage.

I had this install type: Windows - Home Assistant
Then moved to this: Generic x86-64 - Home Assistant

History view of CPU usage where the red arrow marks the move:

Thanks for any input!

It looks to me the average pc usage is lower on the new side then the old side. As for spikes It’s possible the cpu usage before was only showing the portion of cpu usage allocated to the vm and not the whole system outside the vm.

I can’t imagine a scenerio where home assistant in a vm on top windows would work better then haos right on the machine, outside of some odd driver problem or hardware misconfiguration.

Have you noticed better/worse performance since changing it? That’s probably what matters more then the graphs.

Here is a screenshot from the history statistics of the MEAN cpu usage instead of the last 30 days. Here it is much more clearer that the MEAN cpu usage has gone up. But yes, I agree that it is more stable now with a higher usage and previously is was moving a lot more up and down.
image

I suspect your cpu usage was just showing cpu used by the vm itself and not accounting for cpu usage of the host os (windows in this case).

What vm were you using? This vmware documentation seems to imply reported cpu usage is only of the vm.

Someone more familiar with VMs can chime in, but the way they divide resources up on a machine is definitely less efficient then installing the system on bare metal.

I agree, the overall CPU usage is most probably less now since I don’t have Windows in the mix. And yes, HA can only see the CPU usage inside the VM, not anything running on the windows on the host machine. And since the VM was still hosting everything that is hosted today, meaning it was running HA OS. So it shouldn’t be more or less then before, it should be the same. Is this just that the CPU usage is being reported incorrectly inside the VM then?

I was using Virtual Box.