Are these cpu usage spikes normal?

Hello all,

Recently I migrated my HAOS from my RPi3 to a Proxmox VM.
I’m noticing high cpu usage spikes though that I didn’t have before on the pi:

On the Pi, it would be a relatively stable percentage when not used. What could be the reason of these spikes? I gave it 2x 2.0Ghz cores and 2gb ram.

what does it show for CPU usage in PVE >> VM >> Summary?

In proxmox, there are not such high peaks. It averages around 15% cpu use. It looks like the spikes are averaged more.
On the Pi, cpu use would be a stable 2% idle.

Anyone here also running HAOS on Proxmox that could confirm weather this is normal behaviour or not?
What I don’t understand is how my 1 core 1gb Pi3 can run it @ 2% idle load. And 2x 2ghz cores run at 15% idle (in proxmox).

Maybe interesting for some:

The behaviour with the high spikes stayed the same, until yesterday. Yesterday they disappeared.

I’m not sure if it was the HA update, or the fact I moved from HA database to MariaDB(addon). I did both yesterday and noticed it afterwards.

I found the real culprit. It was not the move to MARIADB. The high cpu spikes returned quickly.

I traced it to a esphome device. My IKEA Pm2.5 sensor with a wemos d1 mini inside. As soon as I disabled the device, the cpu spikes were gone and it stayed nicely around 2-3% idling.

Now I winder why this is so cpu intensive? Are there others with the IKEA dust sensor that experience the same?

EDIT:
Another update. It was not the esphome integration of the particle sensor. It was the “Average” sensor from HACS that used the esphome sensor as an input.
Each time the particle sensor gave an update, the Average sensor would recalculate the 24h average and the 7d average. I guess this was pretty cpu intensive. I removed the average sensors from my configuration.yaml, and now all is working nice and stable. Without major cpu spikes. I guess I’ll have to find an alternative, or reconfigure the HACS sensor to be less cpu intensive. Anyway, thread can be closed. Just posted this for the archives. I’ve mostly been talking to myself anyway. =)

3 Likes