HA is so slow on Pi 3/4, sometimes even become unresponsive

Even pi3/4 is not a fast piece of hw, but I see CPU spike from 0.6 to 4+ for hours daily. It seems like some sort of daily cleanup kill the pi.

When CPU usage is low < 1.0, HA is responsive

I don’t have issues with Pi 3, so I have some question to double-check the issue:

  1. Are you running the HA RPi image?
  2. What Add-Ons are you running?
  3. What is the class or speed rating of your SD-card?
  • latest HassOS 4.12
  • add-on: File editor, InfluxDB, Mosquitto broker, Portainer, Terminal & SSH, flicd
  • using a samsung evo select 64 GB (a class 10, U3 (??))

Now, thinking for a bit, maybe influxDB? I am going to stop it and see if the problem goes away.

My test instance of HA runs on a Pi1, and even there I cannot say HA become unresponsive.

I have flic buttons as trigger w/ flicd add-on. The setup automation that use flic button as trigger to turn on/off hue’s light

When CPU > 1.0, button trigger takes 10+ sec to take effect.

If you are running HA Core on your Raspberry Pi, I used to have performance issues with this (sometimes hanging completely) until I set up a ZRAM swap file (following these instructions).

I had also previously switched the database to MariaDB, which made a slight difference, but I was still having issues. Since setting up the ZRAM swap file I’ve gone months without issues.

I will give it a try. Thanks

If running HA OS this should work: