High CPU usage, how to debug?

Hi there!

I do have a high cpu usage and i don’t know, how i may debug the problem. I already hat this problem 2 weeks before. What i did was disabling all automations and the problem was gone. Then i reenabled one by one automation to find out, which made the problem. But the high cpu usage didn’t come back. The i reenabled all automations and after some days, high cpu usage was back. The i switched all automations to node red except of 3 time based automations. Everything seems fine for 3 weeks know but yesterday evening, high cpu usage was back.

So is there anybody, that may give me a hint, how to determine the issue of the high cpu usage? I use home assistant as a proxmox vm so to say as a docker container.

Help wanted :slight_smile:

Thank you!

You can try running

docker stats

command to see cpu/mem usage by a container. High cpu/mem usage was one of the main reason I migrated to container based installation. You can easily set up containers limits, but I don’t know how to do that in supervised or hass os installation without modding containers aka addons and then getting unsupported installation error.

My “docker” container stats are shown in the attached graph. But i think i should be able to determine, which part of home assistant, what automation, what driver, … causes the high cpu load. And thats nothing i can see at the stats of machine, or am i wrong?

It’s a nice graph. I should spend some time with grafana :smiley:
This is what I had in mind.


There you have every container, mem/cpu usage, limitations etc.
Easy to spot problematic guy.

Hi! how did you manage to see these processes?

That’s the Proxmox page for the HAOS VM rather than Grafana!

You need to log into or open the console on the HAOS VM and run the command “docker stats”, it will bring up that screen.