Yes there are a couple of ways but they are not easy to interpret.
Profiler Scan (this will work better after 2024.2 is released with Python 3.12 support as it will show the thread info). But is still worth trying now:
Also Py-Spy.
Run the scan and ask for help interpreting the results in this topic if you need it:
The profiler looks very interesting. As we are only a few days away from 2023.02, I’ll just wait for the update. After all, it has been running like this for over a month now.
I’ll come back here and let you know if it helped when the update is released.
Hi Boerny,
I would be curious how you finally solved this issue. Same phenomenon on my side. Many nightly backups go well but every now and then there is one where the CPU load stays at around 30% in my case. Usually it’s around 1%. Only a restart of the entire system does help, than the CPU load is back to 1% again. I do daily backups during the night. After a week or so the CPU load stays high, even if the backup job is finished. I trigger the backup with an automation rule.
Cheers
I am also finding this to be the case, due to Proxmox backups. I check the HASS VM cpu stats in Proxmox , and the container CPU spikes right when the backup begins within Proxmox. But then it never reduces back to normal. Also finding if I have a browser open with a HASS tab, the browser cpu spikes and stays running high too. It is only resolvable by restarting the entire HASS container within Proxmox.
Even stranger (to me) is that when I use Glances to investigate the CPU usage, it appears to be “python3” as the culprit of high CPU usage. But again, this never happens until the Proxmox backup happens. Perhaps some Integration goes on a runaway loop while Proxmox is freezing certain files for backup, idk.
Having the same issue for about a month or so. Every time I access the dashboard from an iOS device the cpu goes to 100%. It is with the app and also with Safari. If I think of it now, it does not happen when I access HA from my Windows laptop at work.
For more than a year I had this issue as well. Python3 process spiking to use all CPU on the system after 2 hours (Intel Nuc / Home Assistant OS several versions).
Restart of HA brought CPU usage down to normal levels and then again after a few hours it started rising again. Disabling add-ons and HACS components did not help.
I had a work around for a while, where I automatically restarted HA every 2 hours…
Solved
I finally figured out that the reason is an old iPad used as a dashboard through the HA app. It is always on and constantly displaying a camera feed, a few graphs and sensors. When the iPad is turned of, CPU is back to normal…
I’ve spent days chasing down high CPU usage and temperature problems on my Home Assistant Yellow, and have found it has been caused by the 3 x iPads I have running dashboards through the HA iOS app showing live hi-res streams from my Unifi cameras.
I dropped the feeds down to low-res and the CPU returned to normal.
Ever time HA becomes slower and unresponsive, the VS Code container is >100% CPU. Not sure what causes this. No clues were found in the VS code logs.
Update: just found this issue which could be responsible for the high CPU: # Out of control CPU while using #800