MariaDB / MySQL on Synology -- size & performance

I have been experimenting with Home Assistant for about a month now, slowly adding more and more sensors and integrations. My house is fairly complex from the standpoint of the number of sensors etc. so I ended up installing Home Assistant on a NUC8 with i3 after an initial installation on a Raspi 3B+ was getting sluggish, and a migration to a Synology VM was slowing the Synology down too much.

The NUC is much, much faster. I have a InfluxDB instance running on the NUC (for about a week now), and that has accumulated about 38MB of data. My MariaDB instance (still on the Synology, as I haven’t figured out how to move the data to the NUC and set up replication or some type of backup scheme), is now around 800MB, containing about a months worth.
Performance is ok, but with blips – i.e. from time to time when I query a sensor, it sits in the “loading state history” for up to 5 seconds or so and other times it’s nearly immediate. The Synology isn’t busy (anymore) since I moved the Home Assistant install away (between 20 and 50% CPU use), and I have a DS1817+, so it has a little bit of “oomph”.
Questions to the group:

  • With a MariaDB instance of close to a GB, is this expected performance? (NAS has a SHR-2 HDD volume and 512GB of SSD cache)
  • Has anyone successfully set up replication between, say, a NUC supervisor image install MariaDB and a Syno MariaDB instance? I’m thinking of rerouting Home Assistants MariaDB instance to the NUC (it has a NVMe disk of 256GB), but I don’t want to do that without some form of backup.
  • Alternatively, I’ve been toying with the thought of using MS-SQL (since I’m much more familiar with that), and I already have an instance on a VM as well. That instance would be way too slow, so I’d move it to another similar NUC, but then I can easily set up backup jobs etc. Does anyone have experience with the performance of that?
  • What is the best way to backup an InfluxDB instance that’s running on the NUC to my NAS?

Ultimately what I’m looking for is to keep years of data (my current home brew home automation system has data going back to 2016 in its MS-SQL database, but it’s minute-based, not event based). That DB is around 10GB in size now.
At the rate that the MariaDB is growing, it looks like I’ll have about 12GB/yr of data. Not a big deal – I have plenty of storage – but I’d like to keep the performance in check as well.

Suggestions?

1 Like