Is it possible to write item state to 2 persistences ? For example influx and jdbc ?
Which persistence i database do you recommend for fast chard drawing with quite bug amount of data for example for item which is stored every 5 minutes for a year (energy consumption). System is raspberry Pi 4 with 8GB ram and Ubuntu 22.04.
Yes, absolutely, you can use as many persistence services as you want with individual strategies per item and persistence service.
rrd4j is fast and thrifty, but it loses accuracy the older the data gets (i.e. it will create average values over sets of values to save space) InfluxDB is specialized to time series, but for a big amount of data even InfluxDB will need much time and RAM.
When trying to plot the data of every 5 minute-step over the last year each persistence service will take some time, because that are more then 100K datapoints!
Speaking of rrd4j, this system is build to store data for a fixed timeframe ( the default setup in openHAB uses 10 years).
If you create an own setup the choice of maximim timeframe and the used consolisation function (the way how the data is compressed ) is up to you.
As I am interested in data for 1 year only, I use an archive setup which shows the data for every minute for a day. Additionally I use archives to show data for the last week, last month and last year, each with a reasonable increased timestep and a consolidationfunction that fits with the logged data.
Well, for Raspberry Pi, the openHABian image is best practice (i.e. Raspberry Pi OS lite bullseye for now) and brings lots of additional useful stuff.
Ubuntu is known to be problematic in relation with openHAB - or you also can take it the other way, openHAB is known to be less stable with Ubuntu…)