Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. English
    3. ioBroker general
    4. How to lower disk writes (for extending life of an sd card)

    NEWS

    • Neues Video "KI im Smart Home" - ioBroker plus n8n

    • Neues Video über Aliase, virtuelle Geräte und Kategorien

    • Wir empfehlen: Node.js 22.x

    How to lower disk writes (for extending life of an sd card)

    This topic has been deleted. Only users with topic management privileges can see it.
    • paul53
      paul53 @apollon77 last edited by

      @apollon77 sagte:

      this will be likely hard when you do not only use device values, but also logical values.

      A reboot / killing of ioBroker immediately writes the states from RAM to the file. Only in case of a system crash (power failure) such a long time is problematic.

      apollon77 1 Reply Last reply Reply Quote 0
      • apollon77
        apollon77 @paul53 last edited by

        @paul53 ... or a process crash (yes there is come code that tries to write it also when crashing) ... but 🙂 (e.g. a SIGTERM because of OOM might also not write values).

        It is all about "knowing what one is doing"

        1 Reply Last reply Reply Quote 0
        • Tomasz Nowak
          Tomasz Nowak last edited by Tomasz Nowak

          @paul53 , @apollon77
          Thanks for your hints, guys. For now I'm just handling Ecovacs Deebot vacuuming robot (and Daikin aircon soon, probably) over MQTT with no logic within ioBroker. So I hope I don't risk any house disaster with that setting

          @paul53, I've created an issue, thanks.

          1 Reply Last reply Reply Quote 0
          • Dutchman
            Dutchman Developer Most Active Administrators last edited by

            just as suggestion, to avoid load read/write loads on storage and move the to Memory isn't Redis providing more efficient state handling here ?

            1 Reply Last reply Reply Quote 0
            • Tomasz Nowak
              Tomasz Nowak last edited by

              I thought about it but AFAIK Redis also needs to write to disk / sd card. I have relatively small number of states so I believe creating yet another docker instance for Redis would be kind of overkill in my case.

              Mic 1 Reply Last reply Reply Quote 0
              • Mic
                Mic Developer @Tomasz Nowak last edited by Mic

                @Tomasz-Nowak
                I am using Redis successfully for several months. I have installed it on the same system (Debian) on which ioBroker is installed - but no Raspberry experience (I am using a Zotac barebone with Proxmox), though.
                See: https://github.com/ioBroker/ioBroker.js-controller#state-and-objects-databases-and-files
                Also, see: https://redis.io/topics/persistence
                You may want to look into it again, but not sure how the performance is gonna be on a Raspberry.

                Tomasz Nowak 1 Reply Last reply Reply Quote 0
                • Tomasz Nowak
                  Tomasz Nowak @Mic last edited by

                  @Mic
                  I've read that before. They say good for many objects such has 10000 for performance reasons. I have like 50 objects 🙂
                  And I don't want make it more complex (you don't install another services in docker instance, you need another docker)

                  1 Reply Last reply Reply Quote 0
                  • Dutchman
                    Dutchman Developer Most Active Administrators last edited by Dutchman

                    guys wait ...., don't ix performance and io topics please 🙂

                    we are discussing write access to storage, Redis works in memory so less write on disk/card was my hypothese 🙂

                    paul53 1 Reply Last reply Reply Quote 0
                    • paul53
                      paul53 @Dutchman last edited by

                      @Dutchman sagte:

                      Redis works in memory so less write on disk/card

                      Per default Redis writes every 5 minutes to disk/card.

                      Dutchman 1 Reply Last reply Reply Quote 0
                      • Dutchman
                        Dutchman Developer Most Active Administrators @paul53 last edited by

                        @paul53 sagte in How to lower disk writes (for extending life of an sd card):

                        @Dutchman sagte:

                        Redis works in memory so less write on disk/card

                        Per default Redis writes every 5 minutes to disk/card.

                        Better than every 30 seconds 🤷‍♂️

                        Mic 1 Reply Last reply Reply Quote 0
                        • Mic
                          Mic Developer @Dutchman last edited by

                          @Dutchman sagte in How to lower disk writes (for extending life of an sd card):

                          Better than every 30 seconds 🤷‍♂️

                          Exactly, and the default value can certainly be increased to whatever is needed. I would give Redis a try.
                          Also,
                          @Tomasz-Nowak sagte in How to lower disk writes (for extending life of an sd card):

                          They say good for many objects such has 10000 for performance reasons

                          I would assume this statement in the documentation was just made for the ease of use of ioBroker in general: Without like Redis, typically ioBroker's performance is good if you have way less than 10000+ objects. You are having a different use case (limited disc r/w per period). Not sure how the performance (like CPU and memory usage) of Redis is on a Raspberry, but I guess pretty low.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          Support us

                          ioBroker
                          Community Adapters
                          Donate

                          576
                          Online

                          32.1k
                          Users

                          80.6k
                          Topics

                          1.3m
                          Posts

                          states.json write interval
                          5
                          16
                          1478
                          Loading More Posts
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes
                          Reply
                          • Reply as topic
                          Log in to reply
                          Community
                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                          The ioBroker Community 2014-2023
                          logo