Home Assistant is very slow and get stuck once a couple of days

Correct - but copy all that config first and save it elsewhere before you start deleting lines :wink:

Aw sorry, wrong reply :wink:

Unfortunately that didn’t work either :slightly_frowning_face:

Is there a way to disable the other HACS integrations that are not used in lovelace cards without uninstalling?

They should be under your www folder so I guess you can remove them from there and try again.

What is the memory situation of the supervisor (windows in your case)?
Same question for the VM?
What does Windows resource monitor show you when Home Assistant slows to a crawl ? Specifically the CPU loads & the Disk activity… either of those pegged high ?

I think that to move database on external server is one of best solutions to speed up the system and avoid many SD card r/w. I’m using this solutions for serval months and I’m satisfied form the effect.

1 Like

I am convinced that for most HA users who experience laggy performance of HA on an RPi 3 the real reason is memory (RAM). HA has evolved to a point where an average installation with some add-ons will easily consume most of the 1 Gb of memory that an RPi3 provides. Even if only some 700 to 800 Mb of mem are allocated Linux will still start to get much slower. The reason is that free mem is used for disk caching. And HA reads and writes to/from disk a lot for its history data.

So the real solution for this problem is to upgrade to an RPi4 with 4 or 8 Gb of RAM. I have done that and my system flies! You can use my extensive installation guide to get HA running on an RPi4:

You know… I don’t think I ever realized the 3B+ only had 1 damn gig of ram. Holy crap.

Holy crap both because that’s basically no ram, and also holy crap because it’s doing a hell of a lot with no damn ram.

I’m ordering that 8gb 4 today. Tired of these nonsense issues. It sounds as though migration is simply a matter of taking a HA Snapshot on the 3 and restoring from it on the 4?

Yepp, that’s basically it. Read my article though – especially if you want to boot from SSD. The choice of the right SATA to USB adapter (or casing) is crucial to your success. I also recommend you buy a micro HDMI adapter. It’s all in the guide…

And yes, it’s amazing what the Pi does with its limited resources!

Also consider to skip the 4 and directly jump on a Intel NUC. I started with a Pi4 half a year ago and its kinda at its limit by now. And I don’t even have half the IoT-Devices I want bought and/or integrated yet.

Hello, after running without any problems for 6 months my HA installed on an SSD on an 1Gb RPi4 has started crashing randomly, it is either blacking out for 1-3 hours or totally get unresponsive.
I already added a fan so there is no thermal problem.
I get errors related to salute database sometime, other time about observer and watchdog, but really don’t know what to check to understand where the problem is.
I disabled influxdb add-on by mistake and I noticed it run pretty stable.
How can I see how many system resources the add-ons are consuming, I am running the supervised HA in Docker.

Try change the sd card, or better yet, upgrade to a beefier machine… or even vm

I have SSD … no SD, booting from USB.

Just as I am writing I checked my HA and it is dead, again.

I recently had a similar issue. :tired_face:
I was becoming crazy checking swap, SD, HD, selectively disabling addons and custom components…
At the end it seems that disabling every stream of my cameras, everything works fine. :partying_face: :partying_face:
I had no time to dig into the problem but at least now HA is stable again.

Hello, I don’t want to jinx it but it is working ok since yesterday afternoon.
I installed the system integration sensors in the yaml so I could see in the dashboard the RAM and swap usage, and I was seeing that the swap is totally used.
So I modified the swap to 2 Gb.
Since yesterday the swap is continuously slowly increasing, now it is 300 MB.
I also remembered that I also did this on my last installation before it crashed.
But still it will take at least a week of stable working to confirm that it is ok.

That is considered average these days ?! What do you guys do to get to such a high RAM usage ? Run a nuclear power plant over HA ? :open_mouth:

HA on a venv in Raspbian, with Zwave integration, rfxcom, MQTT, apcupsd, Hikvision, stream component, ffmpeg proxy cameras, tons of SNMP, ping and command line sensors, some custom components and custom panels, Mosquitto broker, NTP over GPS server and some other non-HA related processes:

image

I always found that HA used exceptionally few resources for what it does, especially if you remove all the infrastructure around that I consider mostly useless bloat, like supervisor, Docker, etc.

What installation do you have? Is this inside Docker or ?
I have also high usage and only have Influxdb, Grafana and HACS.
Especially when it does a backup the RAM and CPU usage go crazy.
I think you are lucky but your usage is not average.

It’s a Python venv running on Raspbian. There’s no Docker, no HACS. Add ons are installed manually. It’s what they call Home Assistant Core now.

I could probably shave off another 100MB or more by using a text based setup. Right now it’s running a full graphical desktop environment through LXDE with a VNC server.

… and the underlying OS is also not part of your calculation. This article is about Home Assistant OS. You are not running that. But many people do and face problems.

Understood. But if the underlying bare bone OS consumes that much compared to a full Linux desktop OS, which is included in my memory use, then maybe there is a problem somewhere. Because HA itself is certainly not a memory hog.

Anyway, sorry for the offtopic I guess.