Can InfluxDB be replaced with MariaDB?

I use MariaDB (for short term storage) and InfluxDB (for the longer term storage), but due to issues with InfluxDB hogging the CPU, I am wondering if it is possible to replace InfluxDB with MariaDB entirely.

Any thoughts on this with regards to performance, database size, Grafana support, etc.? :slight_smile:

I would try to stick with a time series database for long term storage.
There are a lot positive comments about VictoriaMetrics in the community.

As it can be used a s a drop-in solution input-wise, you can most likely keep using your InfluxDB configuration.

For connecting to Grafana I guess you can use either Influx Language (the old one for InfluxDB 1.x) or PromQL.

1 Like

I run MariaDB on a Synology NAS, I keep 2 years of history in it, works fine. It’s fast and reliable. I have 33.5 million rows in it. ~45,899 rows a day. It’s capability and speed entirely depends on your cpu, disk subsystem and memory. The NAS has 4 raided Ironwolf drives and NVM cache. I give Maria 1GB of RAM.

I took a brief look at Victoria Metrics. It really does look interesting. I just ordered a new case for the RPi and a M.2 disc for a new RPi setup, and I will consider switching to Victoria Metrics. Thanks :+1:

1 Like

Mmmm, it is very tempting to have only one (BIG!) database, but I am worried about the performance. How do you think your NAS compares to a Raspberry Pi 4 in terms of CPU?

According to this it has 68% of the horsepower of the celeron in the NAS.

That said, maria isn’t using much CPU, averaging 0.1% and maybe hitting 5% on a large query. Primarily it is doing disk i/o - reading and writing disk. So the primary consideration will be disk speed and the amount of memory you can give it to cache data in memory. With 1 GB most of my recent data will be in memory, so the query doesn’t require disk access. It also has 256GB SSD cache in front of the spinning disk. If you have a fast SSD drive, could be worth a try.

https://www.cpu-monkey.com/en/compare_cpu-raspberry_pi_4_b_broadcom_bcm2711-vs-intel_celeron_j3455