HAOS at 100% CPU every day at 18:00 for 3 hours

Every day, at 18:00, the CPU utilization climbs to >100% and stays there for 3 hours.
It runs on a Proxmox VM.



(It shows around 50% because I gave the VM 2 cores, but it only utilizes one, so…)

I tried disabling most of the add-ons, with no luck.


The voice-related ones, were disabled anyway.

Any suggestions?

It is hard to say from that info.
Likely candidates would be database optimization/maintenance or auto-updates of ESPHome devices.

If you have Glances installed, then open that when it happens and press z to see all processes.

Purging occurs at 4am-ish. Sundays get a repack too.

True, if it is a default schedule.
It might have been changed with an automation.

Nothing has been changed.
DB optimization takes place at 04:30, and it only takes a few minutes, if not seconds.
Glances shows this:

and this

Could there be anything happening on the proxmox side that could be impacting the resources available to HA.

Also, for the glances info, if after starting the glances UI, click on the glances window & press ‘z’ to list all processes to see a more detailed breakdown of what HA is doing.

The firsts picture is off the expanded view, so it is some python in the home assistant container that seems to cause it.
What does the Home Assistant Core, Supervisor and Host logs say?

You might be able to use this during the excess use events:

I have no idea how to interpret its output though. There’s a topic about it and Py-Spy where one of the devs will look at it for you if you ask. I’ll see if I can find it.

EDIT: here, https://community.home-assistant.io/t/how-to-install-py-spy-on-a-ha-os-instance-please-instruct/430822

Unfortunately, py-spy cannot run in the latest python release…

homeassistant:~/py_spy-0.3.14.data/scripts# ./py-spy top --pid 68
Error: Unsupported version of Python: 3.12.0

I have basically the same problem. python3 spikes to 100% in the homeassistant container and it’s a mystery what exactly is causing it. This has persisted across a move from an RPi3 to VMWare so it’s not a hardware-specific issue.

As you point out py-spy doesn’t work with 3.12. The Profiler might work but seems like overkill just to find out what’s causing this.

Maybe if I list my integrations and add-ons, readers of this can find the intersection of all of those with their setup and that will be the culprit. One I suspect is the nmap tracker because once during this occurrence, I was doing top or ps or something and saw “nmap”. But perhaps that’s a red herring.

Ambient Weather
Android Debug Bridge
Blue Iris
Broadlink
Emporia Vue
Ge Home
Google Nest
HACS
IPP
Lutron Caseta
Mobile App
MQTT
Nmap Tracker
OpenWeatherMap
Pushover
Radio
Roku
Scheduler
Sun
TP-Link Smart Home
TUya
Upnp

Addons:
eWelink
Glances
Mosquitto broker
Terminal & SSH

Well, in my case it disappeared mysteriously as it appeared.
I disabled all add-ons, native and from HACS. The plan was to enable few at a time, until the culprit was found. The issue remained with everything off, so I re-enabled all of them, and decided to live with it untill I had a chance to re-install everything from scratch.
Next day, the problem was gone, and my CPU usage dropped from 20% when idle, to 4%.
That was before the 2024.3 update, and it still behaves as it should.

HACS does not provide add-ons.

So, what do we call Alarmo, or Watchman for example?

Integrations. Third party integrations.

It also provides frontend resources like themes and third party dashboard cards.

Aaaand my issue has disappeared. Same setup, same everything except HA upgrade (and perhaps a couple add-on upgrades). So who knows?

Came here to figure out what’s going on myself. Seeing same spikes as you guys. Hopefully mine will autoheal as well :smile: