HAOS - Out of memory error

Hi:
I’m running HAOS as virtual machine on my NAS, I have configured 1 CPU core and 2GB memory for HAOS, which according to the community is good enough to start.
After starting HAOS the GUI becomes unresponsive, in the console I see “Out of memory” with Python process, so looks like it crashes due to lack of memory. However from the resource monitor, I can see the VM barely use 20% of the allocated memory, so I’m not sure why it can run out of memory?
My NAS has only 16G memory so there is not much I can allocate more, and also it’s strange to me that the process crashed despite that there is available RAM. so what am I doing wrong here? Many thanks!

Edit: I find out the memory usage pct is based on the total memory, and I need to allocate at least 5GB memory for HA in order to start it up. I’m not sure why I need such amount of memory and would appreciate if anybody can tell me how to optimise the usage and find the add-on takes most memory?

Addons can quickly add some memory requirements, but 5Gb needed sounds a bit much.
4Gb should be more than enough.

1 Like

Thanks for your reply! I thought so too, I only have 4 add-on, Matter-Hub is using around 3-3.5%, the rest all below 1%, so maybe some integration is using lots of memory. Is there a way to find which integration use most memory?
Thanks

Here is a nice tip: stop Studio Code server when you are not using it. It is a resource hog.

2 Likes

Are you trying to compile esphome sketches? Depending on the sketch you’ll need 1-3 gigs of free memory and a single core isn’t enough.

I noticed the memory bump for compiling ESP, but I’m not compiling anything, and ESp usage is below 1% according to the add on page