I followed your guide yesterday, it was easy, and the improvement have been quite outstanding. @lkeays, sad to hear about your troubles.
All this is actually pretty strange, and I am going to do a separate posting asking more broadly.
My setup is pretty much like lkeays in size and complexity. The event flow is quite intense often with many messages per second. This is really no problem for Home Assistant, and my RPi 4 usually had CPU around 10%. However, with the default recorder (MySQL I believe), the system was in general sluggish, often freezing for a few seconds, both in the admin screens and over Samba.
Changing to MariaDB has the CPU also around 10% (perhaps a nudge higher), but the sluggishness is gone. How can that be? I am going to speculate and ask about that in another posting.
History graphs are major thing in my tablet gui, so a history db is not for me.
I would like to contact you with a few of my questions about MariaDB.
Iām still a beginner in HA, so I apologize if these are stupid questions.
My HA is running on RPi 4B.
It bothered me that the history of stored data is basically very short. Especially the history of temperature sensors.
So I installed MariaDB and everything seems to be running fine.
But nowhere did I find the settings for what data I want to store and for how long.
So MariaDB basically stores everything and infinitely far into history?
Is it possible to somehow set that I want to store the temperature history indefinitely, for example, but for example the history of switching lights only 24 hours?
Thanks
But I can imagine that two database-engines running at the same time takes some performance and space. Isnāt that a problem?
Secondly: Did you install both databases on your HA via Supervisor -> Add-on-Store? And how do you setup that distinction between āavailableā (MariaDB) data and āarchiveā (InfluxDB) data?
Lookinā forward to see some clarification on this.
Installed InfluxDB and MariaDB in Add-on inside HA
The path, username, password are in secret file
MariaDB Purge keep is 3 days, it will auto clean
To prevent lot of write actions I use commit_interval to 60 seconds. Every 60 seconds its write everything into MariaDB
Beside that it will also put everything in InfluxDB. Reason you canāt use Influx itself, history part in HA only work with MariaDB (What I know)
Thanks for the link. I studied it.
So I understand correctly that in the basic setup, Recorder stores everything in the database with an unchanged history?
I use Alexa TTS and after upgrading to Maria DB on my Intel NUC everything ran much quicker, however the Alexa TTS was completely messed up, re-authentication was required every few hours. I returned to the previous snapshot and all was ok again.
I just realize tonight that the new config ends by mb4
Dont know what is changing?
I have to remove MariaDB Add-On after some months and reinstall again to make a new fresh database. Before my RPi4 CPU is between 20-40% use and after fresh DB between 5-15%ā¦
i will give a feedback if the mb4 change something for me
I have about 95 wifi esp8266, esp32, rpi0w, rpi3b+ and rpi4 connect to HA and 25 zigbee sensors.
When Maria Db is fresh, my CPU idle is about 5-10%, what is nice, but cant encode video records of my cams in H264 (only 2 or 3 simultaneous instance), RPI4 is not enough powerfull from now, because i have too much stuffā¦
Did you meanwhile figure out what is/was the problem with the CPU consumption of your MariaDB addon?
Do others see this as well? That would be the opposite of all the āgreat performance improvement!ā statements - or at least be a big trade-off (more performance by using more resources).