Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Memory usage

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 2 Posters 492 Views
    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.
    • P
      pfsjap
      last edited by

      How does this:

      39f9e54e-931c-410c-8bc2-51c8d30ba48a-image.png

      correlate to this:

      630675cc-b242-43b3-b05e-bf09f72545cc-image.png

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        It's the total memory less Inactive, Free and Laundry:

        https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/includes/functions.inc.php#L211

        Steve

        1 Reply Last reply Reply Quote 0
        • P
          pfsjap
          last edited by

          Ok, that adds up, but why is inactive not taken into account. After all, despite not being "actively" used, it's still using the memory.

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            The comment on that code shows:

            		/* Include inactive and laundry with free memory since they
            		 * could be freed under pressure. */
            
            P 1 Reply Last reply Reply Quote 0
            • P
              pfsjap @stephenw10
              last edited by

              I would rather have dashboard show what the situation is, not what it could be.

              Documentation of the laundry is vague, is there more to it than swapping (and moving pages around)?

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                I won't pretend to be a FreeBSD memory expert. 😉

                However if you want that value to include only Free memory you can just edit that file so the line is:

                $usedMem = $totalMem - $freeMem;
                

                You can include that as an auto-installing patch even if you wanted it to survive updates.

                Steve

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.