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

    SG-3100 ram disk question

    Scheduled Pinned Locked Moved Official Netgate® Hardware
    29 Posts 4 Posters 2.7k 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.
    • F
      FSC830
      last edited by

      I am a bit confused about the RAM disk limits.
      At my SG-3100 the limit is:

      Maximum total size of all RAM disks cannot exceed available memory: 269.75 MiB
      

      To which packages/options/values/... is the limit referring/calculating?

      I do not use RAM disks any longer since my issues, just to still curiosity 😉 .

      Regards

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

        You are probably running an older version before we switched to tmpfs?

        1 Reply Last reply Reply Quote 0
        • F
          FSC830
          last edited by FSC830

          Following your link ends in #12145.

          For various reasons we may want to switch the RAM disks from ufs on md devices to tmpfs .
          

          What is a md device, the internal MMC?
          Is there a diffence when using a SSD instead (ada0)?

          Regards

          Edit: Dashboard widget shows tmpfs!?
          b105c935-7e14-4d78-98b2-11c61f4f5dde-grafik.png

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

            md there is memory disk: https://www.freebsd.org/cgi/man.cgi?query=md

            There's no difference to the ram disks between booting from eMMC or SSD. RAM disks are more common on eMMC installs where drive ware is more of an issue.

            If /var/run is tmpfs you must be running 22.01 or newer. It's possible the limit detection was not updated for 22.01 and you are still seeing it rather than in 22.05?

            Steve

            1 Reply Last reply Reply Quote 0
            • F
              FSC830
              last edited by

              I updated from 22.01 to 22.05 at June, 28th at eMMC and did a complete new install from scratch to SSD at July 1st, 2022.
              Afterwards I restored from ACB the settings, no idea, if the limit is also an outcome of the restore.

              Regards

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

                Are you actually using most of the reset of the RAM then? Perhaps you really only have 270MB available.

                1 Reply Last reply Reply Quote 0
                • F
                  FSC830
                  last edited by

                  The command top shows:

                  CPU: 43.8% user,  0.0% nice, 50.0% system,  0.0% interrupt,  6.3% idle
                  Mem: 88M Active, 464M Inact, 168M Wired, 84M Buf, 1297M Free
                  
                  

                  This matches the total of 2GB.
                  Are there any other commands available, "free" or "/proc/meminfo" seems to be not included in OS?

                  Regards

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

                    Try running: sysctl -a | grep kmem

                    1 Reply Last reply Reply Quote 0
                    • F
                      FSC830
                      last edited by

                      @stephenw10 said in SG-3100 ram disk question:

                      sysctl -a | grep kmem

                      The outcome is:

                      [22.05-RELEASE][admin@xxx]/root: sysctl -a | grep kmem
                      vm.uma_kmem_total: 46063616
                      vm.uma_kmem_limit: 328835072
                      vm.kmem_map_free: 282771456
                      vm.kmem_map_size: 46063616
                      vm.kmem_size_scale: 3
                      vm.kmem_size_max: 328833434
                      vm.kmem_size_min: 12582912
                      vm.kmem_zmax: 65536
                      vm.kmem_size: 328835072
                      
                      

                      Regards

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

                        Hmm, well there's the ~270MB. I don't expect that to apply with tmpfs though. A 650MB drive would be impossible to set it if was. I wonder if that value was set before the gui validity check was added and it's simply never used more than the available kmem.

                        I have to say I wouldn't recommend setting anything too large in the 3100 anyway.

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

                          Yeah, it still checks against available kernel memory:
                          https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/system_advanced_misc.php#L356

                          That could probably be removed with tmpfs there but it's only a significant restriction on arm32 and limiting ram disk size there is not terrible anyway.

                          https://redmine.pfsense.org/issues/13508

                          Steve

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