Anyone know how to see what the system memory usage is and what is using the resources? I have a supervised debian install on and Atom laptop with 2GB of RAM which is being used to 98%. To this end I cannot upload any espHome projects as the memory needed for the complier is not there and core crashes and restarts.
My install is new with only a dozen or so devices being monitored. I am not sure where the memory pressure is coming from.
What should the ‘typical’ memory usage be like? It would be handy if we could get data on what the CPU and Memory usage it for components like core and add ons much like the new startup times we get.
Yes I sure am having issues. I cannot compile and upload any espHome binaries without the system crashing and HA core completing a restart by itself
You can see from my screen shot that its docker that is using all the resources. If I could learn what containers were using what then I could dump it.
OK so it seems like HA on Debian needs close to 2GB of RAM to basically to run (give or take services). That means this laptop is not going to work as it cannot be upgraded and would be even worse if I added more integrations. I hope this helps others.
You top output seems to show that you are only using 1.2 GB of RAM for code. Your statement ‘I cannot compile and upload any espHome binaries without the system crashing and HA core completing a restart by itself’ seems to point to a problem source, but more info would be needed.
I am not a expert on docker, but I did run HA in docker on a 2 GB Rpi for almost a year before moving to a overkill beast i7 16 GB machine. The Rpi experience was over a year ago, so HA might have grown but I think folks are still running with RAM in the 2 to 3GB range. With a number of fairly fat containers, I still never see my current config go over 4GB. My current top and docker outputs are below, top on my machine seems to show about 2.4 GB RAM usage with a fair number of containers running.
I am not sure what version you are on, but I am currently running 2021.5.5 and I have a major memory leak in HA with it’s recorder component. The recorder record purge function gets hung in a loop constantly executing, this results in the swap space going to 100% and everything slowing considerably. I have the recorder purge currently turned off until I can find a solution path. You might turn on debugging output in HA logs for a period and see if you can see anything might be going out of wack. You swap space does not seems to be out of line, but I have found this is something to monitor to find memory leaks in HA and related.
Wow, interesting. I have done all my espHome development on my MacOS workstation, not on my HA server. Is there a use case where you have to do espHome compilation on the HA server?
I’ve never run the ‘all in’ HA path nor running HA just at host OS level. I have always just run a HA docker image in a container and all my other stuff in separate containers.
I am not sure I see a good reason to complicate my HA server with compilers for espHome, and if I did, I would first try and run the espHome compiles in a docker container, not at the host OS level.
Less ‘stuff’ on my HA’s host OS has kept the server more reliable and easier to rebuild (which, fingers crossed I have yet to need to do).
Gee… @tom_l I did not realize I was being setup to be your shill grin. Looking forward to watching, I think the integration of espHome to Home Assistant is going to make for some very interesting future paths and opportunities for the HA universe.
Roll up! Roll up! Witness the ESPHome extravaganza! Live in 2 hours!
I was going to say that ESPHome has always been tightly integrated with Home Assistant. But actually it started out with only mqtt (no API). Though the addon has been around since the beginning.
I tend to write my ESP configs in VSCode, open them in the addon and compile there. Though that may change tomorrow. Compiling is very resource hungry and heats up the fanless mini pc I have HA running on.