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
      last edited by

      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?

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

        @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 Reply Quote 0
        • D Offline
          dazza120 @evroom
          last edited by

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

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

            @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)

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

              @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 Reply Quote 1
              • D Offline
                dazza120 @evroom
                last edited by

                @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

                  @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

                    @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

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

                      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
                      • evroomE Offline
                        evroom @dazza120
                        last edited by evroom

                        @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 Reply Quote 0
                        • 1
                        • 2
                        • 1 / 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