Running HAOS in ProxMOX 8.1

Im curious as to why home assistant running as a VM in proxmox 8.1.10 on a dell r720 with dual xeons, a 500G NVME drive using ZFS, 16 CPUs, and 32 GB RAM still somehow finds a way to not be extremely snappy, load pages almost instantly, and automations work immediately. Not like… take what feels like forever to load automations and scripts editing web pages and leave me in a dark room for 5 seconds or more at times.

To be fair, this isn’t all the time, but its enough to be very frustrating.

Am I using too many resouces? I moved from a pi4 using an SSD in the hopes that the latency would be fixed. It has not. I am seriously at a loss here to get home assistant to perform as well as its lesser counterparts have in the past (smart things and hubitat for starters) on way less beefy hardware.

Any help on this would be greatly appreciated as I am pretty sure its something I am doing as opposed to the OS seeing as there arent a huge amount of posts about this.

I’m surprised it even boots :rofl:

Did you happen to do a backup/restore to migrate from the Pi? It’s possible there’s another root issue (besides resources) that’s giving you troubles.

is that too much ram? im not even joking right now :crazy_face:

I did do a backup restore based on a post I made asking about if I should move to something with a more compute power. Im not sure aboiut any underlying issues that could have come from the migration and to be fair, I wouldnt have a clue how pto figure that out.

Well, you could start with disabling add-ons/HACS integrations (if you have any) to see if things improve. Another option would be to create a clean VM with HAOS and see if a fresh install exhibits the same slowness behaviors.

Is it too much…probably…but I’m about 99% sure that’s not causing you problems. I have, what I believe to be, a fairly large setup with 8 CPU and 8 GB memory. My average use is ~3% CPU and 40% memory.

And my jest was at the use of MB vs GB.

lmao I didnt even notice that, I will fix it haha

To disable HACS and any addons woujld essentially leave me with a useless home assistant setup. I just disabled atime for zfs in the hopes it will help. I cant imagine that any abstraction from it being a VM would cause this unwanted latency.

i will bump the cpu and ram in half if the atime setting doesnt pan out.

Is your install HAOS and is it a VM or bare metal?

That could also be due to a network issue.

Sorry the hardware upgrade didn’t give you the result you were hoping for.

It might help folks troubleshoot if you described the rest of your environment. For example, how may wifi, z-wave and zigbee devices are attached? Is this in a small apartment or a multi-floor home…

An what devices are used in the chain that lags?
Z-wave, Bluetooth, WiFi, any cloud services or so ?

Also Proxmox is a virtualization middleware, so you should enable all virtualization options in the BIOS configuration, if you have not done so yet.

Thanks for the reply.

I suppose anything is possible. I run all unifi networking equipment and the proxmox machine has the HAOS VM is bonded with 2 1gig cat6a cables running back to the LAG I have set up on the switch. I have 6 unifi v6 lite access points and they are all running as expected for everything else around the house. All devices are running on an IoT network I created for them and all devices in the IoT network seem to operate fine (not just the devices in HASS).

The machine works very well for other VMs I had run in the past. As it stands now, I am only running this one VM along with 2 LXC that use next to no resources, so the hardware should not be an issue.

I am looking around now for ways to give the HAOS VM priority kind of like QoS in networking so that anything coming into it will get priority so that automations don’t lag because it is truly maddening lol So far, the only thing I found that might help is turning off atime for zfs. If there are any other tweaks that could help, I am all ears.

HA use VERY little bandwidth, so that is not the issue with your setup.
Bonded NIC setups can be problematic though, so make sure that they are fixed with no autoconfiguration, because a LAG that tries to reconfigure itself all the time will give lag on response times.

Thank for the reply.

I should have added that in the original post. Apologies:

I already described the network setup and can drill down further in that should it be necessary. The zwave devices have not presented an issue, but I have about 7 of them with 2 extenders. 1 have about 30 zigbee devices and the mesh network has not given me any issues once I got it set up. I have about 80 devices on the IoT VLAN, but not all of those are in HASS. I would say 50 or so are though.

The house is appx 2600sf and wifi coverage is more than adequate. I have about 30 lifx bulbs i am slowly moving away from, but the integration for these lights i believe is local, however I could be wrong about that. If I have a cloud service, I plan to either replace it with a non-cloud alternatove or use an API that is local.

You might want to install Netdata on Proxmox, or the Glances Add-On into HA, both will give you a lot of insight into the performance of ram, disk and network IO. What do your integration startup times look like (Settings - System - Repairs - Click the 3 dots…)?

here is the setup in proxmox for the bonded NICs

auto lo
iface lo inet loopback

auto eno1
iface eno1 inet manual

auto eno2
iface eno2 inet manual

iface eno3 inet manual

iface eno4 inet manual

auto bond0
iface bond0 inet manual
        bond-slaves eno1 eno2
        bond-miimon 100
        bond-mode 802.3ad
        bond-xmit-hash-policy layer2+3

auto vmbr0
iface vmbr0 inet manual
        bridge-ports bond0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4092

auto vmbr0.150
iface vmbr0.150 inet static
        address 192.168.150.10/24
        gateway 192.168.150.1

And on the switch side i have it manually set as well:

Can you post a Trace timeline of the automation the next time this happens?

I actually have both installed on that machine (not in HASS) and will look at it more often than I have. Thanks for the suggestion.

yes, I will. Thank you for the suggestion.

1 Like

I have not set up bonded NICs in Linux/Proxmox, so I am not sure what settings are available/needed there, but even an auto-negotiation of link speed can cause issues and should be fixed in both ends.

Do you have multiple NICs set up in HA?

No i dont believe so.

Removing the ZFS logging via an atime command from the cli and then making some additional hardware changes in proxmox has reduced the latency more, I think. I am going to test for a few days and use the suggestions here to keep an eye on it. I know it isnt a perfect world, but I want to get as close to it as possible with respect to latency. If that means bare metal installation, I do have pi5 sitting around doing literally nothing. I think I will eventually need to just bite the bullet and buy a NUC.

VM in Proxmox. Host hardware is an i5-11500, 64 GB RAM, and Samsung 970 Pro SSD. I’m using an LVM for storage with write through caching enabled for the VM disk.