HAOS VM on Proxmox - Expected RAM behavior

I run Home Assistant OS in a VM on Proxmox. This has worked very well for me for well over a year now, but I need some help with expectations. My setup is not very complex. I have roughly 40 devices that I manage, primarily WiFi and Zigbee plus 2 matter devices. mostly just door and motion sensors, a few bulbs and switches, a couple Google home minis, but no cameras. I have about 15 integrations, and maybe a dozen active automations - none of which are very complex compared to what I see in the community. What is odd to me is that no matter how much RAM I assign to the VM, it will utilize 90% of it and hold there. I thought that 4 would be enough, but currently have upped it to 8GB provisioned to the vm and it has been sitting at 7.3GB in use for the last 3 months (for reference, I allocated 2 CPU,s and it consistently stays around 1-2% in use - so no issues there). After a full system reboot, it will drop back down to 5GB in use but over the next few days it will creep back up to 7+.
Have I under-allocated the RAM? Could I have a bad install (I used a Proxmox helper script), or is running HAOS inside of a vm on Proxmox not ideal for some reason? Or might an improper configuration cause the extra memory use? Or is this simply the expected behavior?
I am asking now as I expect to be moving to a new house in a few months, which will be the ideal time to make any recommended changes and have a fresh start.

It is going to do that no matter how much you allocate.


You are better off looking at the System Monitor integration in HA itself.

1 Like

Well if you have VSCode/Code server running, that’s about 1gbish alone. Camera integrations take a lot. There are others.
First, was 4gb enough? Probably was. If you didn’t notice any problems there wasn’t any. A good OS will use the memory allocated to it for integrations, then the rest as cache to speed things up. Give it 16GB it will try to find a way ti use it. That doesn’t mean 8gb wasn’t enough.

1 Like

Thank you both. I can’t mark them both as the solution, but combined they an excellent answer, just what I was hoping for.
Cheers!

1 Like

Linux will also use free RAM as a cache for files. As unused RAM is wasted RAM.

I found that music assistant ate most of my RAM

As cooljimy84 says, Linux, in this case Linux in HAOS, will cache stuff in ram, but still see it as available, because cached stuff can just be ditched quickly.
For the Hypervisor (Proxmox, which is also running Linux) it looks like all the ram is used, because Proxmox can only see the ram used, not if it is for active data or for cached data. It is just data.

If you want to monitor ram, then do it inside the VM.