Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Tester
    4. EXPERIMENTELL: JsonL Datenbank für js-controller

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    EXPERIMENTELL: JsonL Datenbank für js-controller

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

      FAQ Platzhalter

      1 Reply Last reply Reply Quote 0
      • Dr. Bakterius
        Dr. Bakterius Most Active @apollon77 last edited by

        @apollon77 Bin gerade am Umstellen und schon gespannt wie es läuft...

        1 Reply Last reply Reply Quote 2
        • Dr. Bakterius
          Dr. Bakterius Most Active last edited by

          Die ersten 30 Minuten läuft alles wie bisher. In der iobroker.json habe ich den Eintrag '"writeFileInterval": 3600000,' entfernt. Und laut Proxmox-Grafik wird tatsächlich noch weniger auf die Platte geschrieben:
          diskio.png

          Mal sehen wie es aussieht, wenn die Dateien komprimiert und neu geschrieben werden. Die states.jsonl ist in dieser Zeit um ca. 90% gewachsen und die objects.jsonl um etwa 15%.

          Wie sieht es eigentlich mit Backups aus? Unterstützt backitup die neue Datenbank schon?

          apollon77 1 Reply Last reply Reply Quote 0
          • apollon77
            apollon77 @Dr. Bakterius last edited by

            @dr-bakterius backitup müsste den normalen Backup Befehl von ioBroker nutzen. Das ist dB unabhängig. Mir wäre neu das die json files geschrieben werden

            Dr. Bakterius 1 Reply Last reply Reply Quote 0
            • crunchip
              crunchip Forum Testing Most Active last edited by crunchip

              weil's grad so langweilig ist, teste ich auch mal mit, mal sehen, wie sich das "Experiment" schlägt
              das Timing nur etwas ungünstig gewählt, hoffe er wird noch vor 0:00 fertig mit seiner Migration🤔

              1 Reply Last reply Reply Quote 0
              • Dr. Bakterius
                Dr. Bakterius Most Active @apollon77 last edited by

                @apollon77 sagte in EXPERIMENTELL: JsonL Datenbank für js-controller:

                Das ist dB unabhängig.

                Okay, wollte mich nur vergewissern.

                Übrigens in 12 Stunden wurden 25 MiB geschrieben. Am Tag wären das also 50 MiB. Davor hatte ich am Tag 12 GiB mit redis und die objects nur einmal die Stunde als file mit dem neuen controller. Und das war schon deutlich (~90%) weniger als bei file/file und dem vorherigen controller. Also eine gewaltige Reduktion auf praktisch Null! Die gelesenen Daten sind bei mir etwa 100x so hoch - doch das wirkt sich auf das Speichermedium kaum aus.

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

                  Ich würd das gern mal grob Gegenrechnen. Sag mal wie groß die „alten“ objects.json bzw States.json sind ... also nicht die jsonl files.

                  Und .... waren die 190gb mit dem 1h objects speichern oder davor?

                  Dr. Bakterius 1 Reply Last reply Reply Quote 0
                  • L
                    lonsimbt @apollon77 last edited by

                    @apollon77 sagte in EXPERIMENTELL: JsonL Datenbank für js-controller:

                    jsonl

                    Die Umstellung von redis/redis auf jsonl/redis ist bei mir ohne Probleme durchgelaufen. Der iobroker ist anschließend auch ohne Fehler gestartet.

                    Bei mir wurden vorher (nachdem ich die Speicherzyklen für die redis-Datenbank auf alle 12h reduziert hatte) rund 10GB/d geschrieben. Ich werde berichten, wie sich das System mit der neuen Datenbank verhält.

                    Gruß Marco

                    1 Reply Last reply Reply Quote 0
                    • crunchip
                      crunchip Forum Testing Most Active last edited by crunchip

                      geb hier auch mal meinen Stand, nach rund 8Std kund.Ingesamt viel "ruhiger", hochgerechnet, komm ich auf rund 7,5GB diskwrite pro Tag.
                      Ob sich das in Zukunft bewährt, oder irgendwelche Probleme dadurch entstehen, wird sich noch zeigen.
                      9108e5fb-a566-4037-8f9e-c0c7512a4a56-grafik.png 1d211cc1-9ef9-414d-be46-83ba833cb7ed-grafik.png
                      072cb578-aa3b-42c8-9f8e-d1d7f364af6b-grafik.png
                      78e4e118-406e-4c2e-8e67-6b3714d7fb95-grafik.png

                      zum Vergleich, die alten Werte, siehe
                      https://forum.iobroker.net/post/565703
                      https://forum.iobroker.net/post/564780
                      https://forum.iobroker.net/post/564691

                      Was mir jedoch nun noch negativ aufgefallen ist, der Anstieg der CPU
                      97416466-fbba-43b9-975d-494766566f3b-grafik.png

                      vllt auch noch Nennenswert, welche/wie viele Instanzen aktiv laufen

                      + system.adapter.admin.0                  : admin                 : IoBroker                                 -  enabled, port: 8081, bind: 0.0.0.0, run as: admin
                      + system.adapter.alexa2.0                 : alexa2                : IoBroker                                 -  enabled
                       system.adapter.alias-manager.0          : alias-manager         : IoBroker                                 -  enabled
                      + system.adapter.backitup.0               : backitup              : IoBroker                                 -  enabled
                      + system.adapter.ble.0                    : ble                   : IoBroker                                 -  enabled
                      + system.adapter.broadlink2.0             : broadlink2            : IoBroker                                 -  enabled
                      + system.adapter.chromecast.0             : chromecast            : IoBroker                                 -  enabled
                       system.adapter.coronavirus-statistics.0 : coronavirus-statistics: IoBroker                                 -  enabled
                       system.adapter.devices.0                : devices               : IoBroker                                 -  enabled
                       system.adapter.dwd.0                    : dwd                   : IoBroker                                 -  enabled
                      + system.adapter.email.0                  : email                 : IoBroker                                 -  enabled
                       system.adapter.feiertage.0              : feiertage             : IoBroker                                 -  enabled
                       system.adapter.flot.0                   : flot                  : IoBroker                                 -  enabled
                      + system.adapter.fully-tablet-control.0   : fully-tablet-control  : IoBroker                                 -  enabled
                      + system.adapter.history.0                : history               : IoBroker                                 -  enabled
                       system.adapter.ical.0                   : ical                  : IoBroker                                 -  enabled
                       system.adapter.ical.1                   : ical                  : IoBroker                                 -  enabled
                       system.adapter.icons-addictive-flavour-png.0: icons-addictive-flavour-png: IoBroker                                 -  enabled
                       system.adapter.icons-fatcow-hosting.0   : icons-fatcow-hosting  : IoBroker                                 -  enabled
                       system.adapter.icons-icons8.0           : icons-icons8          : IoBroker                                 -  enabled
                       system.adapter.icons-material-png.0     : icons-material-png    : IoBroker                                 -  enabled
                       system.adapter.icons-material-svg.0     : icons-material-svg    : IoBroker                                 -  enabled
                       system.adapter.icons-mfd-png.0          : icons-mfd-png         : IoBroker                                 -  enabled
                       system.adapter.icons-mfd-svg.0          : icons-mfd-svg         : IoBroker                                 -  enabled
                       system.adapter.icons-open-icon-library-png.0: icons-open-icon-library-png: IoBroker                                 -  enabled
                       system.adapter.icons-ultimate-png.0     : icons-ultimate-png    : IoBroker                                 -  enabled
                      + system.adapter.influxdb.0               : influxdb              : IoBroker                                 -  enabled, port: 8086
                      + system.adapter.influxdb.1               : influxdb              : IoBroker                                 -  enabled, port: 8086
                      + system.adapter.influxdb.2               : influxdb              : IoBroker                                 -  enabled, port: 8086
                      + system.adapter.info.0                   : info                  : IoBroker                                 -  enabled
                      + system.adapter.iogo.0                   : iogo                  : IoBroker                                 -  enabled
                      + system.adapter.iot.0                    : iot                   : IoBroker                                 -  enabled
                      + system.adapter.jarvis.0                 : jarvis                : IoBroker                                 -  enabled
                      + system.adapter.javascript.0             : javascript            : IoBroker                                 -  enabled
                      + system.adapter.linux-control.0          : linux-control         : IoBroker                                 -  enabled
                      + system.adapter.logparser.0              : logparser             : IoBroker                                 -  enabled
                       system.adapter.material.0               : material              : IoBroker                                 -  enabled
                      + system.adapter.mihome.0                 : mihome                : IoBroker                                 -  enabled, port: 9898, bind: 0.0.0.0
                      + system.adapter.milight-smart-light.0    : milight-smart-light   : IoBroker                                 -  enabled
                       system.adapter.minuvis.0                : minuvis               : IoBroker                                 -  enabled
                      + system.adapter.ping.0                   : ping                  : IoBroker                                 -  enabled
                      + system.adapter.pollenflug.0             : pollenflug            : IoBroker                                 -  enabled
                      + system.adapter.radar2.0                 : radar2                : IoBroker                                 -  enabled
                       system.adapter.rickshaw.0               : rickshaw              : IoBroker                                 -  enabled
                      + system.adapter.sayit.0                  : sayit                 : IoBroker                                 -  enabled, port: 0
                      + system.adapter.seq.0                    : seq                   : IoBroker                                 -  enabled, port: 5341
                      + system.adapter.shelly.0                 : shelly                : IoBroker                                 -  enabled, port: 1882, bind: 0.0.0.0
                      + system.adapter.shuttercontrol.0         : shuttercontrol        : IoBroker                                 -  enabled
                      + system.adapter.simple-api.0             : simple-api            : IoBroker                                 -  enabled, port: 8087, bind: 0.0.0.0, run as: admin
                      + system.adapter.smartcontrol.0           : smartcontrol          : IoBroker                                 -  enabled
                      + system.adapter.socketio.0               : socketio              : IoBroker                                 -  enabled, port: 8084, bind: 0.0.0.0, run as: admin
                      + system.adapter.sonoff.0                 : sonoff                : IoBroker                                 -  enabled, port: 1885, bind: 0.0.0.0
                      + system.adapter.sourceanalytix.0         : sourceanalytix        : IoBroker                                 -  enabled
                      + system.adapter.tankerkoenig.0           : tankerkoenig          : IoBroker                                 -  enabled
                      + system.adapter.telegram.0               : telegram              : IoBroker                                 -  enabled, port: 8443, bind: 0.0.0.0
                      + system.adapter.telegram.1               : telegram              : IoBroker                                 -  enabled, port: 8443, bind: 0.0.0.0
                      + system.adapter.text2command.0           : text2command          : IoBroker                                 -  enabled
                      + system.adapter.tr-064.0                 : tr-064                : IoBroker                                 -  enabled
                      + system.adapter.trashschedule.0          : trashschedule         : IoBroker                                 -  enabled
                      + system.adapter.unifi.0                  : unifi                 : IoBroker                                 -  enabled
                      + system.adapter.virtualpowermeter.0      : virtualpowermeter     : IoBroker                                 -  enabled
                       system.adapter.vis-bars.0               : vis-bars              : IoBroker                                 -  enabled
                       system.adapter.vis-canvas-gauges.0      : vis-canvas-gauges     : IoBroker                                 -  enabled
                       system.adapter.vis-colorpicker.0        : vis-colorpicker       : IoBroker                                 -  enabled
                       system.adapter.vis-fancyswitch.0        : vis-fancyswitch       : IoBroker                                 -  enabled
                       system.adapter.vis-google-fonts.0       : vis-google-fonts      : IoBroker                                 -  enabled
                       system.adapter.vis-history.0            : vis-history           : IoBroker                                 -  enabled
                       system.adapter.vis-hqwidgets.0          : vis-hqwidgets         : IoBroker                                 -  enabled
                       system.adapter.vis-icontwo.0            : vis-icontwo           : IoBroker                                 -  enabled
                       system.adapter.vis-inventwo.0           : vis-inventwo          : IoBroker                                 -  enabled
                       system.adapter.vis-jqui-mfd.0           : vis-jqui-mfd          : IoBroker                                 -  enabled
                       system.adapter.vis-justgage.0           : vis-justgage          : IoBroker                                 -  enabled
                       system.adapter.vis-keyboard.0           : vis-keyboard          : IoBroker                                 -  enabled
                       system.adapter.vis-lcars.0              : vis-lcars             : IoBroker                                 -  enabled
                       system.adapter.vis-map.0                : vis-map               : IoBroker                                 -  enabled
                       system.adapter.vis-material-webfont.0   : vis-material-webfont  : IoBroker                                 -  enabled
                       system.adapter.vis-material.0           : vis-material          : IoBroker                                 -  enabled
                       system.adapter.vis-materialdesign.0     : vis-materialdesign    : IoBroker                                 -  enabled
                       system.adapter.vis-metro.0              : vis-metro             : IoBroker                                 -  enabled
                       system.adapter.vis-players.0            : vis-players           : IoBroker                                 -  enabled
                       system.adapter.vis-plumb.0              : vis-plumb             : IoBroker                                 -  enabled
                       system.adapter.vis-rgraph.0             : vis-rgraph            : IoBroker                                 -  enabled
                       system.adapter.vis-timeandweather.0     : vis-timeandweather    : IoBroker                                 -  enabled
                       system.adapter.vis-weather.0            : vis-weather           : IoBroker                                 -  enabled
                       system.adapter.vis.0                    : vis                   : IoBroker                                 -  enabled
                       system.adapter.weatherunderground.0     : weatherunderground    : IoBroker                                 -  enabled
                      + system.adapter.web.0                    : web                   : IoBroker                                 -  enabled, port: 8082, bind: 0.0.0.0, run as: admin
                      + system.adapter.wiffi-wz.0               : wiffi-wz              : IoBroker                                 -  enabled
                      + system.adapter.wled.0                   : wled                  : IoBroker                                 -  enabled
                      + system.adapter.yeelight-2.0             : yeelight-2            : IoBroker                                 -  enabled
                      + system.adapter.zigbee.0                 : zigbee                : IoBroker                                 -  enabled, port: /dev/ttyACM0
                      
                      

                      apollon77 AlCalzone 2 Replies Last reply Reply Quote 0
                      • apollon77
                        apollon77 @crunchip last edited by

                        @crunchip den CPU Verbrauch hast du nur absolut gell?! Also weiß nicht welcher Prozess das ggf ist.

                        crunchip 2 Replies Last reply Reply Quote 0
                        • AlCalzone
                          AlCalzone Developer @crunchip last edited by

                          @crunchip sagte in EXPERIMENTELL: JsonL Datenbank für js-controller:

                          der Anstieg der CPU

                          Das würde ich mir gerne mal genau anschauen. Kannst du einen Adapter, der viele Events hat, mal wie folgt manuell starten?

                          cd /opt/iobroker/node_modules/iobroker.<adaptername>
                          node --prof main.js
                          

                          Etwas laufen lassen, dann beenden. Du solltest eine Datei finden, die mit v8.log endet.
                          Diese bitte umwandeln mit

                          node --prof-process --preprocess *v8.log > processed.txt
                          

                          und mir die Datei processed.txt schicken.

                          apollon77 crunchip 2 Replies Last reply Reply Quote 0
                          • crunchip
                            crunchip Forum Testing Most Active @apollon77 last edited by

                            @apollon77 nein leider nicht, ist mir halt nur laut Proxmox Anzeige aufgefallen und bisher auch noch nicht weiter verfolgt

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

                              @alcalzone Macht das Sinn beim Adapter?? Wenn es an der dB liiert kann’s doch nur der Master Controller sein

                              1 Reply Last reply Reply Quote 0
                              • crunchip
                                crunchip Forum Testing Most Active @AlCalzone last edited by

                                @alcalzone sagte in EXPERIMENTELL: JsonL Datenbank für js-controller:

                                node --prof-process --preprocess *v8.log > processed.txt

                                hab ich erledigt, habe mal den sonoff Adapter dafür hergenommen, Text Datei hat 4mb, wohin soll ich sie schicken?

                                1 Reply Last reply Reply Quote 0
                                • AlCalzone
                                  AlCalzone Developer last edited by

                                  @apollon77 könntest Recht haben... Kann @crunchip den auch einfach mit dem Flag starten?

                                  @crunchip müsstest du einfach hier hochladen können oder geht das nicht?

                                  crunchip 1 Reply Last reply Reply Quote 0
                                  • crunchip
                                    crunchip Forum Testing Most Active @AlCalzone last edited by

                                    @alcalzone processed.txt

                                    AlCalzone 1 Reply Last reply Reply Quote 0
                                    • AlCalzone
                                      AlCalzone Developer @crunchip last edited by

                                      @crunchip Da sieht man tatsächlich nichts von der DB. Bin mir gerade nicht sicher, wie man den Controller selbst mit dem Flag starten kann.

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

                                        @alcalzone am Ende startest du die Main.js oder Controller.js. (Geht beides). Grad unterwegs. Daher ganzen Pfad tippen blöd.

                                        1 Reply Last reply Reply Quote 0
                                        • Dr. Bakterius
                                          Dr. Bakterius Most Active @apollon77 last edited by Dr. Bakterius

                                          @apollon77 sagte in EXPERIMENTELL: JsonL Datenbank für js-controller:

                                          Ich würd das gern mal grob Gegenrechnen. Sag mal wie groß die „alten“ objects.json bzw States.json sind ... also nicht die jsonl files.

                                          Die hatten etwa 15 MB (objects) bzw. 2,5 MB (states).

                                          Und .... waren die 190gb mit dem 1h objects speichern oder davor?

                                          Also begonnen hat die Aktion bei mir mit ca. 250 GB / Tag. Das konnte ich etwas reduzieren indem ich den Zyklus von netatmo und daswetter reduziert habe. Nach der Umstellung auf redis für die states und die objects nur einmal pro Stunde schreiben, hatte ich dann rund 23 GB pro Tag. Der neue Controller hat das auf 12 GB pro Tag reduziert. Und jetzt mit jsonl / jsonl komme ich auf 118 MB am Tag.

                                          Wobei mir in den Proxmox-Grafiken noch nicht aufgefallen ist, dass die Dateien gepackt und neu geschrieben wurden. Wie oft passiert das? Denn die 118 MB kommen mir schon wenig vor.

                                          Die CPU-Last ist bei mir auch wieder in die Höhe gegangen (~50% mehr). Durch redis konnte ich gegenüber file aber zuvor die Belastung senken. Jetzt ist sie vielleicht etwas höher als unter file / file. Laut htop verursacht der js-controller die mit Abstand höchste CPU-Last.

                                          AlCalzone 1 Reply Last reply Reply Quote 0
                                          • crunchip
                                            crunchip Forum Testing Most Active last edited by

                                            also würde dann so aussehen, oder?

                                            cd /opt/iobroker/node_modules/iobroker.js-controller
                                            node --prof main.js
                                            *bzw*
                                            node --prof controller.js
                                            

                                            und dann iobroker stoppen, starten?

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            867
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            20
                                            187
                                            17533
                                            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