Coder Social home page Coder Social logo

Comments (2)

mzanetti avatar mzanetti commented on May 13, 2024

What exactly is the issue here? I suppose this is about the frequent disk I/O?
So this is mainly done in order to deal with power losses as users tend to just cut the power cord on the devices running nymea.
I think there was a branch somewhere which would allow a configuration option to only cache on shutdown, but it never landed at this caused too many issues. I could still see a justification for such a config option though, for systems that cannot easily be unplugged and have more strict I/O limits.
In any case, plugin developers should use the caching feature with caution and disable it for states where caching is not needed. There's probably room for optimization in quite some plugins though. You can enable the ThingManager debug category and it will print a message whenever it caches something. That's useful to find states that are cached but should not be.

from nymea.

MennerM avatar MennerM commented on May 13, 2024

Yes it is frequent disk I/O.

When I wrote the issue, I was very deeply involved with the SMA Smart Meter Plugin, which reads data in a high frequency. In the worst case, the file was written 12 times within one second. And we also already have a brocken device where the SD card is damaged.

You are right that here the plugin developer must be very careful.
I think for values that change every second it makes no sense to cache them.
We will check all energy plugins and the hint that we enable the debug category for the ThingManager is very helpful.

from nymea.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.