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.
    • F
      Foradh 0 last edited by

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

      iob diag

      Hi Thomas, anbei das Ergebnis

      
      Skript v.2023-01-02
      
      *** BASE SYSTEM ***
      Model           : Raspberry Pi 3 Model B Plus Rev 1.3
      Architecture:   aarch64
      Docker:         false
      Virtualization: none
      Distributor ID: Debian
      Description:    Debian GNU/Linux 11 (bullseye)
      Release:        11
      Codename:       bullseye
      
      PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
      NAME="Debian GNU/Linux"
      VERSION_ID="11"
      VERSION="11 (bullseye)"
      VERSION_CODENAME=bullseye
      ID=debian
      HOME_URL="https://www.debian.org/"
      SUPPORT_URL="https://www.debian.org/support"
      BUG_REPORT_URL="https://bugs.debian.org/"
      
      Systemuptime and Load:
       12:34:52 up 28 min,  1 user,  load average: 5.50, 7.64, 4.17
      CPU threads: 4
      
      *** Time and Time Zones ***
      Mon Feb  6 11:34:52 UTC 2023
      Mon Feb  6 12:34:52 CET 2023
      CET +0100
      Europe/Berlin
      
      *** User and Groups ***
      pi
      /home/pi
      pi adm dialout cdrom sudo audio video plugdev games users input render netdev lp
      
      *** X-Server-Setup ***
      X-Server:       false
      Desktop:
      Terminal:       tty
      Boot Target:    multi-user.target
      
      *** MEMORY ***
                     total        used        free      shared  buff/cache   available
      Mem:            909M        774M         39M        1.0M         95M         79M
      Swap:             0B          0B          0B
      Total:          909M        774M         39M
      
                909 M total memory
                775 M used memory
                 37 M active memory
                753 M inactive memory
                 39 M free memory
                  7 M buffer memory
                 87 M swap cache
                  0 M total swap
                  0 M used swap
                  0 M free swap
      
      *** FILESYSTEM ***
      Filesystem     Type      Size  Used Avail Use% Mounted on
      /dev/root      ext4      220G  8.0G  203G   4% /
      devtmpfs       devtmpfs  325M     0  325M   0% /dev
      tmpfs          tmpfs     455M     0  455M   0% /dev/shm
      tmpfs          tmpfs     182M  1.1M  181M   1% /run
      tmpfs          tmpfs     5.0M  4.0K  5.0M   1% /run/lock
      /dev/sda1      vfat      255M   31M  225M  12% /boot
      tmpfs          tmpfs      91M   16K   91M   1% /run/user/1000
      
      Messages in dmesg:
      [Mon Feb  6 12:05:56 2023] Kernel command line: coherent_pool=1M 8250.nr_uarts=0rootwait quiet splash plymouth.ignore-serial-consoles
      [Mon Feb  6 12:06:00 2023] EXT4-fs (sda2): INFO: recovery required on readonly f
      [Mon Feb  6 12:06:00 2023] EXT4-fs (sda2): write access will be enabled during r
      [Mon Feb  6 12:06:01 2023] EXT4-fs (sda2): orphan cleanup on readonly fs
      [Mon Feb  6 12:06:01 2023] EXT4-fs (sda2): 1 orphan inode deleted
      [Mon Feb  6 12:06:01 2023] EXT4-fs (sda2): recovery complete
      [Mon Feb  6 12:06:01 2023] EXT4-fs (sda2): mounted filesystem with ordered data
      [Mon Feb  6 12:06:01 2023] VFS: Mounted root (ext4 filesystem) readonly on devic
      [Mon Feb  6 12:06:04 2023] EXT4-fs (sda2): re-mounted. Opts: (null). Quota mode:
      
      Show mounted filesystems (real ones only):
      TARGET  SOURCE    FSTYPE OPTIONS
      /       /dev/sda2 ext4   rw,noatime
      `-/boot /dev/sda1 vfat   rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharse
      
      Files in neuralgic directories:
      
      /var:
      3.3G    /var/
      2.1G    /var/log
      1.8G    /var/log/journal/277251c066b54e14abe3a8dd6d0d19d4
      1.8G    /var/log/journal
      406M    /var/lib
      
      /opt/iobroker/backups:
      375M    /opt/iobroker/backups/
      4.0K    /opt/iobroker/backups/influxDB_2023_01_27-12_11_58_backupiobroker
      
      /opt/iobroker/iobroker-data:
      205M    /opt/iobroker/iobroker-data/
      111M    /opt/iobroker/iobroker-data/files
      60M     /opt/iobroker/iobroker-data/backup-objects
      51M     /opt/iobroker/iobroker-data/files/javascript.admin
      32M     /opt/iobroker/iobroker-data/files/javascript.admin/static/js
      
      The five largest files in iobroker-data are:
      30M     /opt/iobroker/iobroker-data/objects.jsonl
      6.9M    /opt/iobroker/iobroker-data/files/javascript.admin/static/js/610.de0231c
      6.3M    /opt/iobroker/iobroker-data/files/admin.admin/custom/static/js/vendors-n
      5.1M    /opt/iobroker/iobroker-data/states.jsonl
      4.9M    /opt/iobroker/iobroker-data/files/javascript.admin/static/js/848.7424922
      
      *** NodeJS-Installation ***
      
      /usr/bin/nodejs         v16.19.0
      /usr/bin/node           v16.19.0
      /usr/bin/npm            8.19.3
      /usr/bin/npx            8.19.3
      
      nodejs:
        Installed: 16.19.0-deb-1nodesource1
        Candidate: 16.19.0-deb-1nodesource1
        Version table:
       *** 16.19.0-deb-1nodesource1 500
              500 https://deb.nodesource.com/node_16.x bullseye/main arm64 Packages
              100 /var/lib/dpkg/status
           12.22.12~dfsg-1~deb11u3 500
              500 http://security.debian.org/debian-security bullseye-security/main ar
           12.22.5~dfsg-2~11u1 500
              500 http://deb.debian.org/debian bullseye/main arm64 Packages
      
      Temp directories causing npm8 problem: 0
      
      *** ioBroker-Installation ***
      
      ioBroker Status
      iobroker is running on this host.
      
      
      Objects type: jsonl
      States  type: jsonl
      
      Core adapters versions
      js-controller:  4.0.24
      admin:          6.3.5
      javascript:     6.1.4
      
      Adapters from github:   0
      
      Adapter State
      + system.adapter.admin.0                  : admin                 : RPI
        system.adapter.backitup.0               : backitup              : RPI
        system.adapter.daswetter.0              : daswetter             : RPI
        system.adapter.discovery.0              : discovery             : RPI
      + system.adapter.ebus.0                   : ebus                  : RPI
      + system.adapter.fronius.0                : fronius               : RPI
      + system.adapter.influxdb.0               : influxdb              : RPI
        system.adapter.info.0                   : info                  : RPI
      + system.adapter.iqontrol.0               : iqontrol              : RPI
      + system.adapter.javascript.0             : javascript            : RPI
        system.adapter.pvforecast.0             : pvforecast            : RPI
      + system.adapter.rpi2.0                   : rpi2                  : RPI
      + system.adapter.web.0                    : web                   : RPI
      
      + instance is alive
      
      Enabled adapters with bindings
      + system.adapter.admin.0                  : admin                 : RPI
      + system.adapter.influxdb.0               : influxdb              : RPI
      + system.adapter.web.0                    : web                   : RPI
      
      ioBroker-Repositories
      stable        : http://download.iobroker.net/sources-dist.json
      beta          : http://download.iobroker.net/sources-dist-latest.json
      
      Active repo(s): stable
      
      Installed ioBroker-Instances
      Used repository: stable
      Adapter    "admin"        : 6.3.5    , installed 6.3.5
      Adapter    "backitup"     : 2.5.10   , installed 2.5.10
      Adapter    "daswetter"    : 3.1.4    , installed 3.1.4
      Adapter    "discovery"    : 3.1.0    , installed 3.1.0
      Adapter    "ebus"         : 3.0.7    , installed 3.0.7
      Adapter    "fronius"      : 1.1.3    , installed 1.1.3
      Adapter    "influxdb"     : 3.2.0    , installed 3.2.0
      Adapter    "info"         : 1.9.19   , installed 1.9.19
      Adapter    "iqontrol"     : 2.0.0    , installed 2.0.0
      Adapter    "javascript"   : 6.1.4    , installed 6.1.4
      Controller "js-controller": 4.0.24   , installed 4.0.24
      Adapter    "pvforecast"   : 2.3.0    , installed 2.5.1
      Adapter    "rpi2"         : 1.3.2    , installed 1.3.2
      Adapter    "simple-api"   : 2.7.2    , installed 2.7.2
      Adapter    "socketio"     : 4.2.0    , installed 4.2.0
      Adapter    "sonoff"       : 2.5.1    , installed 2.5.1
      Adapter    "web"          : 4.3.0    , installed 4.3.0
      Adapter    "ws"           : 1.3.0    , installed 1.3.0
      
      Objects and States
      Please stand by - This may take a while
      Objects:        1600
      States:         1387
      
      *** OS-Repositories and Updates ***
      Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
      Hit:2 http://deb.debian.org/debian bullseye InRelease
      Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
      Hit:4 http://archive.raspberrypi.org/debian bullseye InRelease
      Hit:5 https://repos.influxdata.com/debian stable InRelease
      Hit:6 https://apt.grafana.com stable InRelease
      Hit:7 https://deb.nodesource.com/node_16.x bullseye InRelease
      Hit:8 https://repo.ebusd.eu/apt/default/bullseye bullseye InRelease
      Reading package lists... Done
      
      
      Thomas Braun 1 Reply Last reply Reply Quote 0
      • Thomas Braun
        Thomas Braun Most Active @Foradh 0 last edited by

        @foradh-0

        Warum hast du denn bei dem mageren 1GB Arbeitsspeicher auch noch den SWAP ausgeschaltet?
        Das kann nicht funktionieren.

        L 1 Reply Last reply Reply Quote 0
        • L
          Luxi @Thomas Braun last edited by

          @thomas-braun steht im ersten Post....

          1 Reply Last reply Reply Quote 0
          • L
            Luxi @Foradh 0 last edited by

            @foradh-0

            In der Konstellation hatte ich auch immer wieder Probleme, wobei ich das Netzteil nicht als Problem wahrnahm.
            Besser funktionieren die USB-Sticks auf SSD-Basis z.B. SanDisk Extreme PRO.
            Aktuell funktioniert das auch super mit dem Raspi-PoE-Hat.

            Hattest du neu installiert und ein Restore gemacht oder alles per dd verschoben?

            LG
            Luxi

            F 1 Reply Last reply Reply Quote 0
            • Thomas Braun
              Thomas Braun Most Active @Foradh 0 last edited by

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

              Nach etwas Überprüfung stelle ich fest, dass wenn ich die SWAP Funktion deaktiviere alles wieder ganz normal läuft.

              Naja, dann würde ich mir dringend anschauen was da falsch läuft. Bei 1GB RAM würde ich Swap auch auf Minimum 1GB setzen, eher 1,5.

              1 Reply Last reply Reply Quote 0
              • BananaJoe
                BananaJoe Most Active @Foradh 0 last edited by BananaJoe

                @foradh-0 ich hoffe diese Anleitung funktioniert noch:

                https://znil.net/index.php?title=Raspbian_-_Swap_File_verschieben_und_vergrößern

                Sieh zu das das Swapfile dann auf der SSD liegt ... liegt die aber schon, oder?
                Aber als Partition?

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

                  Vielen dank für euren Input. Ich hatte zuvor auf der SD Karte die Swap auf 1GB gestellt und das hat auch wunderbar funktioniert. Nur eben seit der Umstellung nicht mehr.
                  @BananaJoe
                  ich habe den Pfad bei /var/swap belassen. Da nur noch die SSD angeschlossen ist sollte das auch auf der SSD als Datei abgelegt sein.
                  Als Partition hab ich das ganze nicht laufen

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

                    @luxi
                    Ich habe das System per Win23 disk imager von SD gesichert und auf die SSD zurückgespielt.
                    Dann mit raspi-config die Partition erweitert

                    L 1 Reply Last reply Reply Quote 0
                    • L
                      Luxi @Foradh 0 last edited by

                      @foradh-0
                      da könnte der Hund begraben sein.
                      Dann können dir hier vielleicht die Linux-Profis helfen.

                      Ich hatte deswegen damals einfach iobroker neu installiert und aus dem Backup wiederhergestellt.
                      Bei Grafana geht das ähnlich.

                      LG
                      Luxi

                      1 Reply Last reply Reply Quote 0
                      • 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
                                            • First post
                                              Last post

                                            Support us

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

                                            486
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

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