I’ve been running HA for years now in Proxmox and it has always been running super stable.
I played with VM settings yesterday and enabled KSM and Ballooning Device set to min 512MB, max 2048MB. Previously, I’ve always been running it at static 2048MB.
It worked fine for about 24 hours until a moment ago:
I don’t know anything about KSM or Ballooning device, but a quick search points towards a dynamic memory setting.
If so, you were already at the minimum recommended RAM for HA (2 GB). Cutting that down by 75% to 512MB is asking for trouble like the OOM errors you’re seeing.
Ballooning device works by the operating system (HAOS in this case) either requesting the RAM from the hypervisor or handing it back when not in use. It looks like in my case it started handing back the RAM when it was needed, resulting in the crash.
As for the second part of your answer, 2GB is more than enough for HAOS. I’ve been using home assistant for years like this and I average 1GB memory usage.
What’s the node’s Summary look like? If the node’s memory utilization goes above the ballooning threshold your HAOS VM will be starved and 512MB is NOT enough for it. The minimum should not go lower than what your guest needs to run its services. In case of HAOS you can check that with the glances app.