MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    UNSOLVED Raspberry Pi Memory Loss

    Troubleshooting
    3
    17
    2159
    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
      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?

      evroom 1 Reply Last reply Reply Quote 0
      • evroom
        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.18.0
        Raspberry Pi 3 Model B Plus Rev 1.3
        Raspbian GNU/Linux 10 (buster)

        D 1 Reply Last reply Reply Quote 0
        • D
          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?

          evroom 1 Reply Last reply Reply Quote 0
          • evroom
            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.18.0
            Raspberry Pi 3 Model B Plus Rev 1.3
            Raspbian GNU/Linux 10 (buster)

            evroom 1 Reply Last reply Reply Quote 0
            • evroom
              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.18.0
              Raspberry Pi 3 Model B Plus Rev 1.3
              Raspbian GNU/Linux 10 (buster)

              D 3 Replies Last reply Reply Quote 1
              • D
                dazza120 @evroom last edited by

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

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

                    evroom 1 Reply Last reply Reply Quote 0
                    • J
                      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
                      • evroom
                        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.18.0
                        Raspberry Pi 3 Model B Plus Rev 1.3
                        Raspbian GNU/Linux 10 (buster)

                        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 Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy