• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.1k 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.
  • D Offline
    dazza120 @evroom
    last edited by Jul 30, 2019, 3:53 PM

    @evroom I’m using mmm-SystemStats to view it on the magic mirror, unless this is monitoring the memory wrong?

    E 1 Reply Last reply Jul 30, 2019, 5:36 PM Reply Quote 0
    • E Offline
      evroom @dazza120
      last edited by Jul 30, 2019, 5:36 PM

      @dazza120
      This modules uses the free command to determine memory usage.
      It does free / total times 100 %.
      But free (the value) does not take into account the shared memory, cache and buffers used by the system.
      It would be better to use the available value.
      This value tells you how much memory is available to start a new application.
      See man free for some more details.

      Modern Linux is making more and more advanced use of memory and swap techniques, making it more and more difficult to determine certain values.

      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)

      E 1 Reply Last reply Jul 30, 2019, 5:49 PM Reply Quote 0
      • E Offline
        evroom @evroom
        last edited by Jul 30, 2019, 5:49 PM

        @evroom
        In node_helper.js you could change line 67.
        Change $4 into $7.
        Then observe if you see the same behavior.

        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 3 Replies Last reply Jul 30, 2019, 8:59 PM Reply Quote 1
        • D Offline
          dazza120 @evroom
          last edited by Jul 30, 2019, 8:59 PM

          @evroom changed it thanks I’ll continue the test much appreciated

          1 Reply Last reply Reply Quote 0
          • D Offline
            dazza120 @evroom
            last edited by Aug 1, 2019, 7:30 AM

            @evroom hi it’s still declining but a lot slower, I’ll let it continue and see if the mirror locks up if it reaches 0%

            1 Reply Last reply Reply Quote 0
            • D Offline
              dazza120 @evroom
              last edited by Aug 1, 2019, 9:27 PM

              @evroom yeah it just died, MagicMirror crashed showing the black screen, when MacicMirror was restarted boom 80% free memory. So now I’ve got watchdog on for hopefully when it crashes it will restart with 80% memory

              E 1 Reply Last reply Aug 1, 2019, 10:41 PM Reply Quote 0
              • J Offline
                jsteel715
                last edited by Aug 1, 2019, 10:27 PM

                Have you tried running top or (htop if installed) from a terminal cli to see which process(es) are using up the memory?

                1 Reply Last reply Reply Quote 0
                • E Offline
                  evroom @dazza120
                  last edited by evroom Aug 1, 2019, 10:43 PM Aug 1, 2019, 10:41 PM

                  @dazza120

                  Could you send the output of the following commands, when running more or less normal?

                  free
                  swapon -s
                  vmstat 5 10
                  top -b -o +%MEM | head -n 22
                  

                  And the suggested htop command is also nice to look at.
                  Might need to be installed separately.

                  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 Aug 2, 2019, 6:54 PM Reply Quote 0
                  • D Offline
                    dazza120 @evroom
                    last edited by Aug 2, 2019, 6:54 PM

                    @evroom restarted the hole thing so memory is good. i have no idea what this other thing is that you and @jsteel715 are talking about lol but here is what you asked for with the code. this is normal operation apart from chromium that is shutdown everytime im not using it

                    pi@raspberrypi:~ $ free
                                  total        used        free      shared  buff/cache   available
                    Mem:        3999788      509844     2834580      197580      655364     3197620
                    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
                     1  0      0 2833448  45296 610956    0    0   867    25  513  852 17  8 69  5  0
                     1  0      0 2830796  45304 613168    0    0     0     6  552  626  2  1 97  0  0
                     0  0      0 2835100  45312 609128    0    0     0    37  537  615  2  1 97  0  0
                     0  0      0 2836716  45320 609156    0    0     0    10  433  483  3  1 96  0  0
                     0  0      0 2836220  45320 609132    0    0     0     0  383  410  1  1 98  0  0
                     0  0      0 2833132  45328 609768    0    0     0    23  308  329  2  1 96  0  0
                     0  0      0 2833684  45328 609136    0    0     0    32  502  528  1  1 98  0  0
                     0  0      0 2839432  45328 602188    0    0     1     2 1054 1883  6  4 90  0  0
                     0  0      0 2830820  45336 609832    0    0     9    13 1684 2816 18  6 76  0  0
                     3  0      0 2825096  45344 615684    0    0     0    11 1597 2651 19  5 76  0  0
                    pi@raspberrypi:~ $ top -b -o +%MEM | head -n 22
                    top - 19:50:21 up 6 min,  2 users,  load average: 1.35, 0.78, 0.38
                    Tasks: 159 total,   1 running, 157 sleeping,   0 stopped,   1 zombie
                    %Cpu(s):  7.7 us,  3.8 sy,  0.0 ni, 88.5 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
                    MiB Mem :   3906.0 total,   2774.0 free,    502.4 used,    629.6 buff/cache
                    MiB Swap:    100.0 total,    100.0 free,      0.0 used.   3131.1 avail Mem 
                    
                      PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
                     1452 pi        20   0  411492 145144  95428 S   0.0   3.6   0:37.40 chromium-+
                      815 pi        20   0  537468 141332  82408 S  10.5   3.5   0:26.66 electron
                      905 pi        20   0  356568 114216  62964 S   0.0   2.9   0:13.56 electron
                     1155 pi        20   0  473740  99856  80016 S   0.0   2.5   0:11.76 chromium-+
                     1484 pi        20   0  336364  74940  56704 S   0.0   1.9   0:02.31 chromium-+
                     1201 pi        20   0  318296  74660  56632 S   0.0   1.9   0:18.70 chromium-+
                      900 pi        20   0  301448  66488  48860 S   0.0   1.7   0:04.48 electron
                      494 root      20   0  151824  52472  37340 S   0.0   1.3   0:38.00 Xorg
                     1206 pi        20   0  266728  50416  38620 S   0.0   1.3   0:01.99 chromium-+
                      539 pi        20   0  136068  44144  25440 S   0.0   1.1   0:01.74 PM2 v3.5.+
                     1535 pi        20   0  286880  39344  31156 S   0.0   1.0   0:00.09 chromium-+
                      728 pi        20   0  128372  37932  25488 S   0.0   0.9   0:00.98 npm
                     1176 pi        20   0  198328  34484  28812 S   0.0   0.9   0:00.17 chromium-+
                      451 root      20   0   58952  33852  17416 S  10.5   0.8   0:28.86 vncserver+
                      634 pi        20   0  149252  28832  22788 S   0.0   0.7   0:01.44 lxpanel
                    pi@raspberrypi:~ $ 
                    
                    
                    1 Reply Last reply Reply Quote 0
                    • E Offline
                      evroom
                      last edited by Aug 2, 2019, 8:02 PM

                      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 Aug 2, 2019, 8:20 PM Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        7/17
                        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