Update item(s) every second: good or bad?

Maybe this is a strange/stupid/silly question, but is it a good idea to have items which can change every second?
I want to see my usage of electricity, gas, water, solar production in real time (like the fancy energy flows), but this requires offcourse real-time data. At the moment I only grab these (accumulated) values every 5 minutes. This is more then enough for graphs. I don’t need this data in a database, the accumulated values which I already use are enough.
How are other users dealing ith this?

The true answer is “it depends”. But in general, a few Item that updates every second shouldn’t be a problem, but if you have hundreds of such Items or a bunch of complicated rules that run on every update you might run into trouble.

It sounds like you probably wouldn’t run into any problems. And if you do, all that may be required is to move to a beefier machine. I personally have about a dozen Items that update roughly every second with a ton more that update every few seconds. But I’m also running on a VM on a full sized computer with plenty of RAM.

Anectodal evidence only i.e. no formal performance analysis.

For an example, it’s very easy to set up a non-trivial Modbus configuration to update hundreds of Items per second, by design or inadvertantly.
Of course this WILL have an impact in a resource limited environment like a Pi host.

The observation is that the biggest impact comes from careless Persistence configuring - e.g. every Item, every update. Easily done by relying on default settings; easily circumvented with a little thought.
Makes sense, the overheads of database transactions are higher than just updating an Item object.

(For the Modbus example there are binding based means to reduce duplicate updates in the first place, but that’s another story.)

Thanks for the answers. In the past In had OH2.x running on a Pi3, and since I switched to OH3 it’s running in Docker, next to a lot other containers. Docker runs on a Synology with 8GB ram, but I already noticed the system is getting slow sometimes. A reboot of OH solves this for some time.
I was already thinking for a dedicated server for Docker or even only for OH, but that’s maybe overkill.

If you have many Items updating every second, as it seems, then I would recommend reviewing your persistence setup. OH3 does a lot of stuff by default, which is great for easy beginner startup, but if ignored becomes a drain on non-trivial users.

In a 1-minute cron jython rule:

  Battery_Voltage_Avg = PersistenceExtensions.averageSince(ir.getItem("Battery_Voltage"), ZonedDateTime.now().minusMinutes(1))
  if Battery_Voltage_Avg is not None:
    events.postUpdate(ir.getItem("Battery_Voltage_Avg"), Battery_Voltage_Avg.floatValue())

Got a big cron rule that does a bunch of those. “Battery_Voltage” is updated rapidly. It is “persisted” only in the default rrd4j. This is a round robin db – it doesn’t keep a huge history of anything that changes rapidly, but enough to do averages or whatever on the last few minutes. Battery_Voltage_Avg is persisted in a postgresql db that goes back forever.

If you’ve got slower/smaller disk, perhaps 5 minute intervals are preferred. Easy enough.