Optimize HA performance

Thanks for the pointers, @MaxK!

What I learned so far:

  • In the cookbook there are sections about migrating back from MariaDB or PostgreSQL to the built in SQLite. One of those mentions:

    With all the performance improvements to Home Assistant over the last year, the benefits of using MariaDB have somewhat declined.

    So that answers my question whether migrating will still yield performance gains in 2025. It seem it won’t, so I’ll stay with SQLite for now.

  • I enabled debug mode, as described in the Tracking down instability issues… post you linked to. I found one custom integration that was logging a lot of errors. Since I did not use it anymore, the solution was simple: remove the integration. Not sure whether that contributed to system performance, I’ll have to see if the situation has been improved during the next couple of days. Other than that, there were some errors that don’t seem to serious and that are not logged frequently. I don’t think they will have an impact on performance.

  • One of the suggestions in that same post was to install the profiler. I did that, let it run for a minute, downloaded the resulting file and opened it in qchachegrind. As a software developer, I do have some experience with profiling tools, so an image like this doesn’t intimidate me too much:


    (But it made me wonder whether it’s a good idea to recommend random users to do this, but that aside.) The result doesn’t look concerning. I’m assuming the 99.66% and 88.70% functions are part of some “main loop”, so it makes sense they’re called so often. But it’s hard to interpret without knowing the code.

So, I’ll monitor the system the next couple of days. Maybe that custom integration I removed was the culprit. In the mean time, if someone could confirm from the screenshot that this is a normal looking profile, that would be nice.

1 Like