• 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 4.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.
  • D Offline
    dazza120
    last edited by Jul 30, 2019, 8:55 AM

    Hi not sure if anyone else with a pi has noticed but the longer the Magic Mirror runs the more ram it uses for exactly the same thing it started up with, ie start up MagicMirror and I have 80% memory free four hours later and it’s 78% still not bad but a day later then it’s 58% memory free. This is on a Pi 4 with 4Gb of ram so I’m not sure how all the other Pi’s and other mirrors are doing but it seems to tear up a lot of memory. Anyone able to offer any help in this area?

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

      @dazza120
      Hi,

      how do you determine free memory?
      With the later Linux distros it becomes easy to jump to wrong conclusions and there are several settings involved. that can influence it.

      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 Jul 30, 2019, 3:53 PM Reply Quote 0
      • 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
                      • 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