MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Raspberry Pi Memory Loss

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    17 Posts 3 Posters 5.7k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • evroomE Offline
      evroom
      last edited by

      Could you repeat this when memory usage has increased substantially?

      The chromium processes are taking up quite some memory.
      I myself have none running.

      Did you get the latest packages?

      $ sudo apt-get update
      $ sudo apt-get dist-upgrade
      

      MagicMirror version: 2.30.0
      Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
      Raspbian GNU/Linux 12 (bookworm)

      Test environment:
      MagicMirror version: v2.30.0
      Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
      Raspbian GNU/Linux 12 (bookworm)

      D 1 Reply Last reply Reply Quote 0
      • D Offline
        dazza120 @evroom
        last edited by dazza120

        @evroom said in Raspberry Pi Memory Loss:

        $ sudo apt-get update
        $ sudo apt-get dist-upgrade

        ok so ive done the apt-get update before so not much but dam the apt-get dist-upgrade took about 10mins or so. I just turned off the chromium run in the background even when it is closed and the use accelerated hardware.

        1 Reply Last reply Reply Quote 0
        • D Offline
          dazza120
          last edited by

          @evroom this is how the mirror runs normally no other processes than this.

          pi@raspberrypi:~ $ free
                        total        used        free      shared  buff/cache   available
          Mem:        3999788      376340     3175032      110328      448416     3418840
          Swap:        102396           0      102396
          pi@raspberrypi:~ $ swapon -s
          Filename				Type		Size	Used	Priority
          /var/swap                              	file    	102396	0	-2
          pi@raspberrypi:~ $ vmstat 5 10
          procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
           r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
           0  0      0 3176112  44568 402592    0    0   789    17  431  701 11  7 76  6  0
          0  0      0 3175952  44568 403184    0    0     0     2  263  276  1  1 97  0  0
           0  0      0 3174436  44568 403332    0    0     0     1  255  239  2  1 97  0  0
           0  0      0 3174572  44576 402708    0    0     0     3  289  291  1  2 97  0  0
           0  0      0 3174476  44576 402708    0    0     0     0  333  338  1  2 97  0  0
           0  0      0 3175072  44576 402708    0    0     0     0  237  236  2  1 97  0  0
           0  0      0 3173972  44576 402708    0    0     0     0  303  307  2  2 97  0  0
           1  0      0 3172272  44576 403184    0    0     1     0  342  374  2  2 97  0  0
           1  0      0 3172448  44584 404204    0    0     0     3  293  288  4  2 94  0  0
           0  0      0 3172144  44584 404196    0    0     0     2  274  259  1  2 97  0  0
          pi@raspberrypi:~ $ top -b -o +%MEM | head -n 22
          top - 21:30:36 up 2 min,  2 users,  load average: 0.27, 0.25, 0.10
          Tasks: 162 total,   1 running, 160 sleeping,   0 stopped,   1 zombie
          %Cpu(s):  4.4 us,  1.5 sy,  0.0 ni, 94.1 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
          MiB Mem :   3906.0 total,   3097.4 free,    370.0 used,    438.7 buff/cache
          MiB Swap:    100.0 total,    100.0 free,      0.0 used.   3336.5 avail Mem 
          
            PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
            814 pi        20   0  537468 140148  82128 S   0.0   3.5   0:17.93 electron
            904 pi        20   0  356056 111640  62768 S   0.0   2.8   0:12.55 electron
            899 pi        20   0  303116  67132  49136 S   0.0   1.7   0:06.92 electron
            493 root      20   0  151288  51768  37196 S   6.2   1.3   0:05.34 Xorg
            537 pi        20   0  136076  43848  25392 S   0.0   1.1   0:01.72 PM2 v3.5.+
            702 pi        20   0  127868  37380  25404 S   0.0   0.9   0:00.99 npm
            439 root      20   0   78344  34092  17460 S   6.2   0.9   0:06.21 vncserver+
            807 pi        20   0   86380  28656  23016 S   0.0   0.7   0:00.19 node
            610 pi        20   0  157416  28516  22584 S   0.0   0.7   0:01.23 lxpanel
           1153 pi        20   0   85700  28048  22108 S   0.0   0.7   0:00.76 lxterminal
            816 pi        20   0  139544  25756  19504 S   0.0   0.6   0:00.10 electron
            611 pi        20   0   83220  21764  17288 S   0.0   0.5   0:00.79 pcmanfm
            605 pi        20   0   62252  14620  12332 S   0.0   0.4   0:00.30 openbox
            677 pi        20   0   31400  14188  12644 S   0.0   0.4   0:00.11 vncserver+
            664 pi        20   0   31772  12832  10560 S   0.0   0.3   0:00.42 vncserver+
          pi@raspberrypi:~ $ 
          
          
          1 Reply Last reply Reply Quote 0
          • D Offline
            dazza120
            last edited by

            @evroom this is it at 60% just running the mirror

            pi@raspberrypi:~ $ free
                          total        used        free      shared  buff/cache   available
            Mem:        3999788     1191448     1723096      363156     1085244     2410100
            Swap:        102396           0      102396
            pi@raspberrypi:~ $ swapon -s
            Filename				Type		Size	Used	Priority
            /var/swap                              	file    	102396	0	-2
            pi@raspberrypi:~ $ vmstat 5 10
            procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
             r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
             0  0      0 1724372  83516 1000540    0    0     1     2   37   10  8  4 88  0  0
             0  0      0 1722544  83516 1000824    0    0     0     0  357  423  1  1 98  0  0
             0  0      0 1722348  83516 1000652    0    0     0     5  226  217  1  1 98  0  0
             0  0      0 1723448  83516 999932    0    0     0     0  261  277  1  1 97  0  0
             0  0      0 1723164  83516 1000676    0    0     0     0  247  249  1  1 98  0  0
             4  0      0 1725856  83520 1000652    0    0     0     2  443  310 56  1 43  0  0
             0  0      0 1736892  83520 1000652    0    0     0     0  419  319 39  2 59  0  0
             0  0      0 1735444  83520 1002136    0    0     0     0  245  260  1  1 97  0  0
             0  0      0 1735384  83520 1002136    0    0     0     0  296  356  1  2 97  0  0
             0  0      0 1735408  83520 1002136    0    0     0     1  270  283  1  1 98  0  0
            pi@raspberrypi:~ $ top -b -o +%MEM | head -n 22
            top - 04:48:48 up 1 day,  7:21,  2 users,  load average: 0.69, 0.75, 0.70
            Tasks: 151 total,   1 running, 149 sleeping,   0 stopped,   1 zombie
            %Cpu(s): 18.9 us,  8.1 sy,  0.0 ni, 73.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
            MiB Mem :   3906.0 total,   1694.7 free,   1151.2 used,   1060.1 buff/cache
            MiB Swap:    100.0 total,    100.0 free,      0.0 used.   2365.6 avail Mem 
            
              PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
              904 pi        20   0 1382888   1.1g 313184 S  38.9  28.4 330:15.93 electron
              814 pi        20   0  790640 152908  83008 S   0.0   3.8 247:27.16 electron
              899 pi        20   0  309132  69832  49136 S   0.0   1.7 223:14.37 electron
              493 root      20   0  152020  52524  37268 S  16.7   1.3  54:27.50 Xorg
              537 pi        20   0  138800  43548  25412 S   0.0   1.1   0:13.47 PM2 v3.5.+
              702 pi        20   0  127868  37380  25404 S   0.0   0.9   0:00.99 npm
              439 root      20   0   80140  36180  17492 S  11.1   0.9   0:53.80 vncserver+
              610 pi        20   0  157644  28832  22600 S   0.0   0.7   0:51.52 lxpanel
              807 pi        20   0   86380  28656  23016 S   0.0   0.7   0:00.19 node
             4608 pi        20   0   85108  27664  21924 S   0.0   0.7   0:00.62 lxterminal
              816 pi        20   0  139544  25756  19504 S   0.0   0.6   0:00.10 electron
              611 pi        20   0   83220  21764  17288 S   0.0   0.5   0:00.91 pcmanfm
              677 pi        20   0   31400  14836  13292 S   0.0   0.4   0:00.25 vncserver+
              605 pi        20   0   62488  14620  12332 S   0.0   0.4   0:00.51 openbox
              664 pi        20   0   31772  12832  10560 S   0.0   0.3   0:01.06 vncserver+
            pi@raspberrypi:~ $ 
            
            
            1 Reply Last reply Reply Quote 0
            • evroomE Offline
              evroom
              last edited by evroom

              So it is an electron process, hence MM process, alright.
              Now find a way how to determine which module is causing this.
              Which modules do you have active?

              MagicMirror version: 2.30.0
              Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
              Raspbian GNU/Linux 12 (bookworm)

              Test environment:
              MagicMirror version: v2.30.0
              Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
              Raspbian GNU/Linux 12 (bookworm)

              1 Reply Last reply Reply Quote 0
              • evroomE Offline
                evroom
                last edited by evroom

                Can you do following ?

                Please do not post output that is very long.
                Just want to get a feeling if these commands lead to anything, hence the MMM module eating memory

                $ top -b -o +%MEM | head -n 8
                
                $ strace -T -o /tmp/strace.out -p PID_from_top_command
                
                After about 15 seconds, use control-c to stop strace.
                
                For example:
                $ strace -T -o /tmp/strace.out -p 904
                
                $ grep 'name_of_MMM_module' /tmp/strace.out
                
                For example:
                $ grep 'mmm-systemtemperature' /tmp/strace.out
                
                $ grep 'name_of_MMM_module' /tmp/strace.out | wc -l
                
                For example:
                $ grep 'mmm-systemtemperature' /tmp/strace.out | wc -l
                

                MagicMirror version: 2.30.0
                Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
                Raspbian GNU/Linux 12 (bookworm)

                Test environment:
                MagicMirror version: v2.30.0
                Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
                Raspbian GNU/Linux 12 (bookworm)

                1 Reply Last reply Reply Quote 0
                • 1
                • 2
                • 2 / 2
                • First post
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Sam, technical setup by Karsten.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy