Load averages for hassio?

I’m fairly new to hassio, but I have had to go through customizing my recorder to reduce the load on my pi3b+. My current config hovers around 0.5 load average (typically 5% CPU or less) throughout the day. History and logging are reasonably responsive (around 5sec load time). So I feel what I ha e is stable, but wanted to get an idea of what other ppl are seeing as far as load average and their experiences along those lines (with perhaps minimal info about your setup to help explain why). Like… I have run my 1000 mode pi zero setup at load average of 10.0 for years without problems… or I wouldn’t feel cozy if my reliable alarm setup ever saw over 0.2 load average.

My network consists of about 40 nodes. Most are lazy battery powered zwave window sensors. The traffic mostly comes from a pair of (not recorded) zwave energy meter plugs, and a handful of zha and mqtt devices that report temp, humid, and baro every 10min. There is also 3 serial sensors for measuring power supply/ups/backup batt status (also 10min reports max).

I am using the nodered addon for all my automations. There isn’t a whole lot going on there I think… just an alarm panel, presence, some telegram texts for appliance and alarm status, sunset-sunrise lighting… not very extensive I don’t think. My setup is what you might call ‘mainstream’ in that it doesn’t go very deep with gadgetry, but the common convenience features are there.

I noticed if I mess with zwave and something happens to my energy meter outlets (they briefly become unknown), when the nodes return to active sometimes load averages start to shoot up to the 2.0-5.0 range (unstable in general… hassio responds very slowly and automations sometimes get skipped). Deleting the database and rebooting always returns things to normal… this doesn’t occur on it’s own either (always due to me buggering the zwave network I think).

In the process of said buggering… I also noticed my pi flies like the wind when the 2 energy meters are excluded or otherwise not working (load averages drop well below 0.1 all day).

So it seems the load average on a pi is largely dependent on 1) usage of the database, and perhaps 2) abundance of zwave (also zha too?) traffic.

It would be great if we had some more info on the key metrics at play when trying to get the most out of a pi install. Like some kind of list that gives ‘performance reduction’ points for certain features… something we could refer to and say ‘that likely won’t work on a pi’… or you could get Hassio more stable by changing/disabling X if you have to use Y.

I have been noticing what seems to be a pattern in the high load avg occurrences (for all 1m, 5m, and 15m periods). My recorder keep and purge intervals are 7d and 1d respectively. If I start with deleting the database and rebooting (fresh db created), my load averages stay low (0.1-0.3) for a few days, occasionally creeping up to 0.5ish. After 7days it consistently seems to shoot up to around 1.0 and stays there… never goes back down. The only way to speed things back up is delete the db and reboot again. I am guessing this has to do with the way hassio manages the db purge.

Is anyone else seeing this behavior?

Also on a side note, CPU % usage is the same… 5%ish. I observed that on occasions when CPU briefly shot up to 25% or so, load averages drop quickly (CPU clearing out tasks quickly… probably choking on as card writes for db operations… or something to that effect).

Are you storing your db on sd card?

Yes, it is probably choking on sd card writes to db.

Probably. Try a USB device or an external database.

What is a good usb3 device that ppl are using for these things?

…like some brands/models of ssd?

I don’t have a NAS… yet.