Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Raspberry Pi3+ SSD + SWAP

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Raspberry Pi3+ SSD + SWAP

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

      Setze auch einen rpi4 mit ssd ein. Hatte eine USB Verlängerung verwendet, die einen Wackel hatte. Direkt eingesteckt __> läuft problemlos

      F 1 Reply Last reply Reply Quote 0
      • F
        Foradh 0 @mading last edited by

        @mading
        Das kann ich in meinem Fall eigentlich auch ausschließen. Es läuft ja tatsächlich stabil wenn ich Swap deaktiviere. Die Probleme treten nur mit aktiviertem Swap auf

        Homoran 1 Reply Last reply Reply Quote 0
        • Homoran
          Homoran Global Moderator Administrators @Foradh 0 last edited by

          @foradh-0 sagte in Raspberry Pi3+ SSD + SWAP:

          Die Probleme treten nur mit aktiviertem Swap auf

          also bei vielen Schreibzugriffen.
          klingt fast nach USB3

          F 1 Reply Last reply Reply Quote 0
          • F
            Foradh 0 @Homoran last edited by

            @homoran
            Meinst du ein bekanntes Problem mit USB3?

            Es wird folgende Hardware verwendet.
            SSD = Kingston A400 240GB
            StarTech 2.5″ SATA adapter USB 3.0

            1 Reply Last reply Reply Quote 0
            • F
              Foradh 0 last edited by

              Ich habe mein Problem nun mit dem Tool Zram umgehen können.
              Mit Zram kann man einen Teil des Arbeitsspeicher als Swap nutzen und den Inhalt darin komprimieren.
              Ich habe 25% (227MB) für Zram reserviert und mit dem Faktor 3 komprimiert, dadurch erhalte ich 682MB Swap auf dem Arbeitsspeicher.

              sudo cat /proc/swaps
              Filename                                Type            Size            Used            Priority
              /dev/zram0                              partition       698592          353024          75
              
              free -h
                             total        used        free      shared  buff/cache   available
              Mem:           909Mi       694Mi        55Mi       0.0Ki       160Mi       160Mi
              Swap:          682Mi       344Mi       337Mi
              
              

              Nun kann ich wieder alle Adapter nutzen und der RPI läuft stabil.
              Mich würde natürlich trotzdem interessieren warum der Swap auf der SSD nicht funktioniert.

              Y 1 Reply Last reply Reply Quote 0
              • Y
                Ychsel @Foradh 0 last edited by

                Danke an alle hier im Forum, die sich mit so wertvollen Beiträgen beteiligen. Ich habe auch ein SWAP Problem mit meinem 1GB Pi3 nach Installation mit Influx und Grafana gehabt und bin hierdurch zur Gewissheit gekommen, dass ich die Swap größe anpassen muss. Jetzt funktioniert es. Als nächstes kommt dann der SSD USB stick... Danke

                Homoran 1 Reply Last reply Reply Quote 0
                • Homoran
                  Homoran Global Moderator Administrators @Ychsel last edited by

                  @ychsel sagte in Raspberry Pi3+ SSD + SWAP:

                  und bin hierdurch zur Gewissheit gekommen, dass ich die Swap größe anpassen muss.

                  so ein Quatsch!
                  der SWAP ist ein Notfall Auffangbehälter und sollte bei einer vernünftigen Installation gar nicht genutzt werden.

                  1 Reply Last reply Reply Quote 1
                  • K
                    kimukao last edited by

                    @homoran Bin über diesen Beitrag gestolpert, da ich in letzter Zeit vermehrt Performance-Probleme bei meinem Pi4 4GB feststelle, auf dem iobroker (40 Adapter, 100 Skripte), Grafana, influxdb und deconz laufen. Nicht alle Skripte werden vollständig ausgeführt, es kommt bei der Ausführung zu unterschiedlich langen Wartezeiten, auch derr Zugriff auf die Konsole ist lahm. Gebootet wird von einer schnellen SSD Festplatte (Samsung), auf der auch die ganze Installation ist. Ich würde mich als Endanwender bezeichnen und habe keine Ahnung von Linux. In der "Hosts" Übersicht der Konsole sehe ich selten CPU Werte von unter 40%, manchmal sind es 80% oder sogar 100%. Der Swap Wert liegt gerade bei 47Mi, war eben aber auch schonmal bei 99Mi.

                    pi@raspberrypi:~ $ free -h
                                  gesamt       benutzt     frei      gemns.  Puffer/Cache verfügbar
                    Speicher:      3,7Gi       2,7Gi       178Mi       0,0Ki       863Mi       1,2Gi
                    Swap:           99Mi        47Mi        52Mi
                    

                    Hat jemand eine Idee, wo ich einen Fehler in der Installation gemacht haben könnte? Oder kommt der Pi einfach an seine Grenzen, sodass ich über stärkere Hardware nachdenken sollte? Ich habe noch nicht probiert, einen USB Hub mit eigenem Netzteil für die SSD zwischenzuschalten. Müsste ich erst besorgen. Wäre das evtl. ein Lösungsansatz? Vielen Dank im Voraus!

                    Thomas Braun Homoran ? 3 Replies Last reply Reply Quote 0
                    • Thomas Braun
                      Thomas Braun Most Active @kimukao last edited by

                      @kimukao sagte in Raspberry Pi3+ SSD + SWAP:

                      Hat jemand eine Idee, wo ich einen Fehler in der Installation gemacht haben könnte? Oder kommt der Pi einfach an seine Grenzen, sodass ich über stärkere Hardware nachdenken sollte?

                      Gib uns mal die Ausgabe von

                      iob diag
                      

                      Dann kann man vielleicht mehr sagen.

                      K 1 Reply Last reply Reply Quote 0
                      • Homoran
                        Homoran Global Moderator Administrators @kimukao last edited by

                        @kimukao sagte in Raspberry Pi3+ SSD + SWAP:

                        Oder kommt der Pi einfach an seine Grenzen, sodass ich über stärkere Hardware nachdenken sollte? I

                        wenn Grenzen, dann RAM. Aber da sind noch 1.2GB verfügbar.
                        der Überlauf in den SWAP muss wohl kurzfristig gewesen sein.

                        Als erstes käme mir da ein (zu) großes Backup in den Sinn.

                        1 Reply Last reply Reply Quote 0
                        • K
                          kimukao @Thomas Braun last edited by

                          @thomas-braun said in Raspberry Pi3+ SSD + SWAP:

                          Gib uns mal die Ausgabe von
                          iob diag

                          ======================= SUMMARY =======================
                          		     v.2023-04-02
                          
                          
                          Operatingsystem: 	Raspbian GNU/Linux 11 (bullseye)
                          Kernel: 		5.15.84-v7l+
                          Installation: 		Native
                          Timezone: 		Europe/Berlin (CEST, +0200)
                          User-ID: 		1000
                          X-Server: 		false
                          Boot Target: 		graphical.target
                          
                          Pending OS-Updates: 	29
                          Pending iob updates: 	5
                          
                          Nodejs-Installation: 	/usr/bin/nodejs 	v16.19.1
                          			/usr/bin/node 		v16.19.1
                          			/usr/bin/npm 		8.19.3
                          			/usr/local/bin/npx 		8.5.0
                          
                          Recommended versions are nodejs 18.x.y and npm 9.x.y
                          
                          MEMORY: 
                                         total        used        free      shared  buff/cache   available
                          Mem:            3.8G        2.9G        236M        0.0K        731M        1.0G
                          Swap:            99M         99M        0.0K
                          Total:          3.9G        3.0G        236M
                          
                          Active iob-Instances: 	39
                          Active repo(s): beta
                          
                          ioBroker Core: 		js-controller 		4.0.24
                          			admin 			6.4.3
                          
                          ioBroker Status: 	iobroker is running on this host.
                          
                          
                          Objects type: jsonl
                          States  type: jsonl
                          
                          Status admin and web instance:
                          + system.adapter.admin.0                  : admin                 : raspberrypi                              -  enabled, port: 8081, bind: 0.0.0.0, run as: admin
                          + system.adapter.web.0                    : web                   : raspberrypi                              -  enabled, port: 8082, bind: 0.0.0.0, run as: admin
                          
                          Objects: 		47396
                          States: 		30285
                          
                          Size of iob-Database:
                          
                          51M	/opt/iobroker/iobroker-data/objects.jsonl
                          9.4M	/opt/iobroker/iobroker-data/objects.json.migrated
                          9.4M	/opt/iobroker/iobroker-data/objects.json.bak.migrated
                          59M	/opt/iobroker/iobroker-data/states.jsonl
                          2.4M	/opt/iobroker/iobroker-data/states.json.migrated
                          2.4M	/opt/iobroker/iobroker-data/states.json.bak.migrated
                          0	/opt/iobroker/iobroker-data/states.json.broken
                          
                          
                          
                          =================== END OF SUMMARY ====================
                          
                          Thomas Braun 1 Reply Last reply Reply Quote 0
                          • Thomas Braun
                            Thomas Braun Most Active @kimukao last edited by

                            @kimukao sagte in Raspberry Pi3+ SSD + SWAP:

                            Pending OS-Updates: 29

                            System aktuell halten, npx fixen und boot target auf multi-user setzen:

                            sudo systemctl set-default multi-user.target
                            iob stop
                            sudo rm /usr/local/bin/npx
                            sudo apt update
                            sudo apt full-upgrade
                            sudo reboot
                            
                            K 1 Reply Last reply Reply Quote 0
                            • ?
                              A Former User @kimukao last edited by

                              @kimukao sagte in Raspberry Pi3+ SSD + SWAP:

                              iobroker (40 Adapter, 100 Skripte), Grafana, influxdb und deconz laufen

                              Moin,

                              kannst Du mal anfangen, Skripte, die nicht lebenswichtig sind zu stoppen. Du musst vielleicht auch mal parallel ein Terminal (Putty) aufmachen und mit top, htop oder btop, je nachdem was bei Dir installiert ist schauen, welche Prozesse CPU / Speicher verbrauchen, wenn alles mal wieder lahm ist.

                              100 Skripte, da kann schon mal eines dabei sein, dass den Rechner in die Knie zwingt, wenn es startet.

                              VG
                              Bernd

                              Thomas Braun K 2 Replies Last reply Reply Quote 0
                              • Thomas Braun
                                Thomas Braun Most Active @Guest last edited by

                                @dp20eic sagte in Raspberry Pi3+ SSD + SWAP:

                                100 Skripte

                                100 Skripte verbrauchen auch mehr Ressourcen als weniger, dafür umfangreichere, wenn ich mich recht entsinne.

                                1 Reply Last reply Reply Quote 0
                                • K
                                  kimukao @Thomas Braun last edited by

                                  @thomas-braun said in Raspberry Pi3+ SSD + SWAP:

                                  System aktuell halten, npx fixen und boot target auf multi-user setzen:
                                  sudo systemctl set-default multi-user.target iob stop sudo rm /usr/local/bin/npx sudo apt update sudo apt full-upgrade sudo reboot

                                  Danke für die schnelle Hilfe. Hab jetzt alle Schritte mal ausgeführt. iob diag sieht jetzt so aus:

                                  ======================= SUMMARY =======================
                                  		     v.2023-04-02
                                  
                                  
                                  Operatingsystem: 	Raspbian GNU/Linux 11 (bullseye)
                                  Kernel: 		6.1.21-v8+
                                  Installation: 		Native
                                  Timezone: 		Europe/Berlin (CEST, +0200)
                                  User-ID: 		1000
                                  X-Server: 		false
                                  Boot Target: 		multi-user.target
                                  
                                  Pending OS-Updates: 	0
                                  Pending iob updates: 	5
                                  
                                  Nodejs-Installation: 	/usr/bin/nodejs 	v16.19.1
                                  			/usr/bin/node 		v16.19.1
                                  			/usr/bin/npm 		8.19.3
                                  			/usr/bin/npx 		8.19.3
                                  
                                  Recommended versions are nodejs 18.x.y and npm 9.x.y
                                  
                                  MEMORY: 
                                                 total        used        free      shared  buff/cache   available
                                  Mem:            3.8G        2.5G        228M        0.0K        1.0G        1.3G
                                  Swap:            99M          0B         99M
                                  Total:          3.9G        2.5G        328M
                                  
                                  Active iob-Instances: 	38
                                  Active repo(s): beta
                                  
                                  ioBroker Core: 		js-controller 		4.0.24
                                  			admin 			6.4.3
                                  
                                  ioBroker Status: 	iobroker is running on this host.
                                  
                                  
                                  Objects type: jsonl
                                  States  type: jsonl
                                  
                                  Status admin and web instance:
                                  + system.adapter.admin.0                  : admin                 : raspberrypi                              -  enabled, port: 8081, bind: 0.0.0.0, run as: admin
                                  + system.adapter.web.0                    : web                   : raspberrypi                              -  enabled, port: 8082, bind: 0.0.0.0, run as: admin
                                  
                                  Objects: 		47479
                                  States: 		30447
                                  
                                  Size of iob-Database:
                                  
                                  53M	/opt/iobroker/iobroker-data/objects.jsonl
                                  9.4M	/opt/iobroker/iobroker-data/objects.json.migrated
                                  9.4M	/opt/iobroker/iobroker-data/objects.json.bak.migrated
                                  64M	/opt/iobroker/iobroker-data/states.jsonl
                                  2.4M	/opt/iobroker/iobroker-data/states.json.migrated
                                  2.4M	/opt/iobroker/iobroker-data/states.json.bak.migrated
                                  0	/opt/iobroker/iobroker-data/states.json.broken
                                  
                                  
                                  
                                  =================== END OF SUMMARY ====================
                                  

                                  Beobachte jetzt mal, wie es sich weiter verhält. Denke aber, es sieht schon besser aus 🙂

                                  Thomas Braun ? 2 Replies Last reply Reply Quote 0
                                  • Thomas Braun
                                    Thomas Braun Most Active @kimukao last edited by

                                    @kimukao sagte in Raspberry Pi3+ SSD + SWAP:

                                    Pending iob updates: 5

                                    und

                                    Recommended versions are nodejs 18.x.y and npm 9.x.y

                                    würde ich noch angehen.

                                    K 1 Reply Last reply Reply Quote 0
                                    • ?
                                      A Former User @kimukao last edited by

                                      @kimukao sagte in Raspberry Pi3+ SSD + SWAP:

                                      Beobachte jetzt mal, wie es sich weiter verhält. Denke aber, es sieht schon besser aus

                                      Moin,

                                      klar, sieht das jetzt erstmal besser aus, Du hast ja auch einen Reboot gemacht, warte mal ab und beobachte das System mal mit einem der von mir oben genannten Programme, wenn erst mal wieder alle Skripte einmal angelaufen sind, sieht das vielleicht schon wieder anders aus.

                                      VG
                                      Bernd

                                      1 Reply Last reply Reply Quote 0
                                      • K
                                        kimukao @Guest last edited by

                                        @dp20eic said in Raspberry Pi3+ SSD + SWAP:

                                        kannst Du mal anfangen, Skripte, die nicht lebenswichtig sind zu stoppen.

                                        Danke. Tatsächlich brauche ich alle. Bewegungsmelder- und Lichtschalter-Skripte könnte ich zusammenführen, das würde einige Skripte einsparen. Wenn das zu besserer Performance führt wäre das eine Überlegung wert. Ich fand es so irgendwie übersichtlicher.

                                        1 Reply Last reply Reply Quote 0
                                        • K
                                          kimukao @Thomas Braun last edited by

                                          @thomas-braun said in Raspberry Pi3+ SSD + SWAP:

                                          Pending iob updates: 5

                                          und

                                          Recommended versions are nodejs 18.x.y and npm 9.x.y

                                          würde ich noch angehen.

                                          Hab ich jetzt auch gemacht. Allerdings jetzt neue Probleme: die 5 Adapter Updates lassen sich nicht durchführen. Bzw. sie laufen durch und zeigen keinen Fehler während des Updates an, anschließend zeigen sie aber immer noch die alte Versionsnummer und definieren sich als updatefähig. Der Klimaanlagenadapter daikin-cloud lässt sich gar nicht mehr starten. Sind da Probleme im Zusammenhang mit der nodejs Verison 18.15.0 bekannt?

                                          ======================= SUMMARY =======================
                                          		     v.2023-04-02
                                          
                                          
                                          Operatingsystem: 	Raspbian GNU/Linux 11 (bullseye)
                                          Kernel: 		6.1.21-v8+
                                          Installation: 		Native
                                          Timezone: 		Europe/Berlin (CEST, +0200)
                                          User-ID: 		1000
                                          X-Server: 		false
                                          Boot Target: 		multi-user.target
                                          
                                          Pending OS-Updates: 	0
                                          Pending iob updates: 	5
                                          
                                          Nodejs-Installation: 	/usr/bin/nodejs 	v18.15.0
                                          			/usr/bin/node 		v18.15.0
                                          			/usr/bin/npm 		9.5.0
                                          			/usr/bin/npx 		9.5.0
                                          
                                          Recommended versions are nodejs 18.x.y and npm 9.x.y
                                          
                                          MEMORY: 
                                                         total        used        free      shared  buff/cache   available
                                          Mem:            3.8G        2.4G        147M        0.0K        1.2G        1.3G
                                          Swap:            99M          0B         99M
                                          Total:          3.9G        2.4G        247M
                                          
                                          Active iob-Instances: 	38
                                          Active repo(s): beta
                                          
                                          ioBroker Core: 		js-controller 		4.0.24
                                          			admin 			6.4.3
                                          
                                          ioBroker Status: 	iobroker is running on this host.
                                          
                                          
                                          Objects type: jsonl
                                          States  type: jsonl
                                          
                                          Status admin and web instance:
                                          + system.adapter.admin.0                  : admin                 : raspberrypi                              -  enabled, port: 8081, bind: 0.0.0.0, run as: admin
                                          + system.adapter.web.0                    : web                   : raspberrypi                              -  enabled, port: 8082, bind: 0.0.0.0, run as: admin
                                          
                                          Objects: 		49581
                                          States: 		32105
                                          
                                          Size of iob-Database:
                                          
                                          45M	/opt/iobroker/iobroker-data/objects.jsonl
                                          9.4M	/opt/iobroker/iobroker-data/objects.json.migrated
                                          9.4M	/opt/iobroker/iobroker-data/objects.json.bak.migrated
                                          26M	/opt/iobroker/iobroker-data/states.jsonl
                                          2.4M	/opt/iobroker/iobroker-data/states.json.migrated
                                          2.4M	/opt/iobroker/iobroker-data/states.json.bak.migrated
                                          0	/opt/iobroker/iobroker-data/states.json.broken
                                          
                                          
                                          
                                          =================== END OF SUMMARY ====================
                                          
                                          Thomas Braun 1 Reply Last reply Reply Quote 0
                                          • Thomas Braun
                                            Thomas Braun Most Active @kimukao last edited by

                                            @kimukao

                                            Jag den fixer über das System.

                                            K 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate
                                            FAQ Cloud / IOT
                                            HowTo: Node.js-Update
                                            HowTo: Backup/Restore
                                            Downloads
                                            BLOG

                                            444
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            11
                                            47
                                            2866
                                            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