HA running slow

Yesterday my HA running Hassio 0.72.1 on RPi3 was running slow… The sonoff switch normally responds to UI nearly instantaneously had a delay about 5 seconds before responding. I restarted Hassio but that didn’t help, a restart of the Pi got everything fixed up.

Question, what would cause this long delay? Is the Pi under powered? Aside from restarting the Pi, what else can I do to prevent this delay?

FYI, I’m running 7 add-ons, Configurator, Node-RED, TasmoAdmin, Mosquitto Broker, SSH server, Samba, zigbee2mqtt. I keep 2 days worth of history, about 108MB. I don’t know if any of these things would make a difference or not.

Thanks

What do your loads look like with all that running?

Any other wifi or network issues popping up?

Anything else responding slowly?

I don’t use hassio, with other installs you can monitor all the traffic on your broker, you can see if the delay is between hassio and the broker or the broker and your switch. I forget the wildcard for the mosquitto sub command but Im sure you can find it in a google search or someone will pop in with the command.

I’m not sure how to monitor the loads on the RPi…

There are no other wifi/network issues at the same time, it was very specific to HA.

I probably should have monitored the mqtt traffic during that time and see if the problem is with the broker or client but I didn’t, will need to wait until the next time.

Not sure if this component works in hassio.

You can monitor (in hassbian at least) the processor load % and the 1, 5, 15 minute loads.

Had an issue with HA, not Hass, was running slow. Set up a MariaDB server on a different computer and speed is back on.

1 Like

I put in the system monitor component and able to see the load. Other than a spike to 3+ yesterday around 4pm, the system monitor is showing < .5 on the load. HA is running slow again today, So i might have look into monkey-house’s solution of installing MariaDB.

There are a ton of people running on a Pi with Hassio without issue. Before setting up a seperate database you might dig further into what is causing your issue.

Common issues with the Pi are power supply and SD card related. What are you using for each?

With Hassio it could be related to the base system or hass itself. How big is your database file getting? Any warnings in the log file?

I would love to get to the bottom of this problem without setting up a separate DB.

The power supply is an iPhone USB adapter, which has a 5V, 1amp rating and a SanDisk ultra 16gb SD card. I have the recorder set on 2 day purge and it’s about 134mb. I did not check the log file prior to restarting the Pi, which fixes the slowness issue, but restarting removes all the old entries in the log.

I am having the exact issue, running version 0.75.3 hassio on rp3 with samba, Google home webserver and duckdns add-ons. Still using ResinOS version. I get slow down after a few days. Mqtt switches take about 10 seconds to operate. The switch sliders move about between on and off. After rebooting hassio, the switches work instantly. I am using Maria dB on a separate server but it hasn’t helped. I am wondering if my log file is growing too big and the reboot clears it. I will check next time it happens.

Here’s something you might want to try. I switched out the iPhone USB adapter for another rated at 5V, 2A and that seems to have fixed the issue of slow down with my HA.

I don’t know if that was it, try it and let me know if that helps.

I did just install Hassbian instead with latest update to python 3.7. Much faster on the exact same Pi3+ and Sd card. Have tried 1.9 32 and 64 bit of hassio. Hassbian is 3-4 times as fast to shut down,reboot, check history, check yaml config validator etc.
Also looks like Hassio have big issues with Zwave. Takes forever to start and stop.

Is it likely to be the power supply? it is 5v 2.5A. The slowdown takes several days to happen. I was thinking it is software related. A reboot always fixed it for a few days. May try moving to HassOS version of hassio or try a different sd card.

Recommended is 5 V, 2.5A. If you have lower specced you should probably upgrade.

Hello, I`m new with HA and installed hass.io on my Pi couple of days ago. (Pi B+, Aeotec z stick, 32GB Samsung EVO SD, 5V 2.5A power supply + some few add-ons, Samba, Aircast, SSH).

Working great at the first, but yesterday after including couple a of more z wave devices (I have 8 added so far now and 20 z wave devices in my house), now the system is acting slower and slower for every reboot, initialization takes forever and nobody nodes are getting ready. The light switches experience major lag with up to 1-2 minute response time. Seems to getting slower every time a z wave device is added or when I do a reboot of the Pi. My existing z wave devices was previously connected to homeseer, with some low poll time, However if I am correct the poll time is set by the hub (SW) or not the devices itself,?

At the point this is a ridiculousness slow system and something must be wrong. Is there anything I could try, I see people says Hasbian install is much faster, should I try this? My DB file is about 300mb after 4 days of running.

According to a search on the forum it seems like more people is struggling with this, but I can`t find any straight answer/fix to the issue.

Thanks for any help

I agree, I have done nothing to my system yet to try to solve this, other than keep updating to the latest stable version. I am now getting the slow down straight away after a reboot with the switches for my Mqtt tasmota sonoffs sliding back and forth for a few seconds. Hope someone looks into what’s causing this.

Same issue here. CPU Load is about 30% which I think is considerable. Would be good to see with what home-assistant spends most of its time…

Same Issue. I switched to an external mariadb to try and fix the issue, but had no impact. Super speedy for a few hours whenever I drop the DB, then slows as it climbs to about 50mb in 24 hours and then becomes unusably slow to load / respond. Over the past few days I’ve trimmed down the “include” items in history, etc, which cut the DB size in half but only marginally fixed the slowdown.

I am also feel this is connected to the database size. I deleted the tables as there were some old entries and it is fast again. I have also set exclusions for logging automations, etc. It seems slightly better. I still think there is some optimisation needed somewhere.

1 Like

The database doesn’t seem to be responsible in my case. even de-activating the recorder component doesn’t fix the slowdown.

I am also having the same issue and been struggling for a few days. Initially I have my setup on PI B+ with Aeotec 5 Gen card and Elelabs ZigBee Raspberry Pi Shield. I upgraded to 5V 3A adapter and also upgrade the Micro-SD to SanDisk 128 GB. I remember the issue started when I added several new devices on Z-wave. After that I faced sever delays in the front-end slowing to almost dead and clicking anywhere on the icons makes my chrome unstable even. I then tried PostgreSQL on the same PI which did not improve the speed. I even removed all devices and added them again without luck, They will work for a few hours and start slowing down afterwards.

After losing hope on the PI, I setup yesterday a new server with Debian installed from scratch and ditched the ZigBee entirely, the machine has an SSD HDD and running only Home-assistant in virtual env, and I even tried to use MySQL for database. it worked great for a short period and now I am facing the same issue again.
My machine load:

this is driving my nuts trying to debug as the system is not stable and making me consider to move away from HA.