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

    What size RAM disk?

    Scheduled Pinned Locked Moved General pfSense Questions
    9 Posts 3 Posters 1.9k 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.
    • J
      JimBob Indiana
      last edited by JimBob Indiana

      What size RAM disk?

      Screenshot 2023-05-04 102906.jpg

      S 1 Reply Last reply Reply Quote 0
      • S
        SteveITS Galactic Empire @JimBob Indiana
        last edited by

        @jimbob-indiana ...that you should set? "It depends" on what is needed and how much RAM your router has.

        https://docs.netgate.com/pfsense/en/latest/config/advanced-misc.html#config-ram-disks has a brief discussion. I believe other posts here have suggested at minimum using double the minimum. On a router with 4 GB and plenty of RAM we usually set 512 MB for /tmp and 1 GB for /var. Someone could easily have a setup with lots of logging or temp space needed and need more than that. Once I tried adding the very large UT1 block list because someone here was having trouble using it, and found it used more than 1 GB of space just downloading/extracting the list.

        With recent pfSense versions the RAM disk doesn't actually use the RAM until files are written to it...it no longer pre-allocates the RAM. So you can make it a little bigger without "wasting" RAM.

        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
        Upvote 👍 helpful posts!

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

          I usually use double the default size to start with and that's almost always fine for a base install.

          Many packages will require a lot more than that. Some packages cannot run from RAM disks like that.

          Steve

          1 Reply Last reply Reply Quote 1
          • J
            JimBob Indiana
            last edited by

            I set it at 256 and then 512 for \var and I'm getting alerts that I need to address the ram disk size. I'm gonna try 512 and 1024.

            If I keep getting that alert message and the sizes are way more than needed then its something else. I'm not all that certain ram disk make a difference. I have 8gb so its worth playing around.

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

              It really depends what you're doing. Using RAM disks does significantly reduce drive writes though. And it makes filesystem damage far less likely if you're running UFS. So it makes sense on a 3100 running from eMMC without any large packages for example.

              1 Reply Last reply Reply Quote 0
              • J
                JimBob Indiana
                last edited by JimBob Indiana

                Getting this even though ram size is 512 and 1024.

                “available free RAM (6.95 GiB)”

                “RAM disk creation failed. Reverted to traditional storage. Check RAM disk sizes. @ 2023-05-04 18:59:36”

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

                  What version are you testing in?

                  J 1 Reply Last reply Reply Quote 0
                  • J
                    JimBob Indiana @stephenw10
                    last edited by

                    @stephenw10 DEV 2.7

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

                      Yup, there was a bug introduced. The next snap will be fixed:
                      https://redmine.pfsense.org/issues/14351

                      Steve

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