Navigation

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

    RAMDisk usage

    General pfSense Questions
    3
    7
    1966
    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.
    • K
      kevindd992002 last edited by

      I just noticed that there is a way to use a RAMDisk for both the /tmp and /var as indicated in the note in that setting. I have 2GB RAM on the pfsense box so I think it would be better to go this route.

      What contents do both /tmp and /var have that I will lose by this setting change? Is it wise to use a RAMDisk with that amount of RAM or is it useless?

      1 Reply Last reply Reply Quote 0
      • K
        kevindd992002 last edited by

        BUMP!

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

          Why do you want to use ram disks?
          Probably the most important thing you loose is that logs stored in /var/log are lost when the box reboots.

          Steve

          1 Reply Last reply Reply Quote 0
          • K
            kevindd992002 last edited by

            Ok.

            Well, why is the option there anyway? Wouldn't it improve performance at all?

            1 Reply Last reply Reply Quote 0
            • P
              phil.davis last edited by

              If you have some slow storage device then the RAM disk will improve performance. Admins might like to enable RAM disk also because they have a device that they perceive might "wear out" - an old SSD. But newer SSDs should not have either of these issues. In any case, the option is there for those who want to play with it.
              The things that can be saved are RRD data and DHCP lease data. With a normal shutdown, these should be saved to real storage and reloaded on startup. But if you have an unexpected power interruption, then it is good if you have turned on the option to save them at regular intervals. At least then a relatively recent copy will be loaded from real storage at boot.
              Other things like logs are not saved - if you want long-term logs then use a syslog server.
              I think that covers stuff of medium-long-term interest in /var and /tmp

              1 Reply Last reply Reply Quote 0
              • K
                kevindd992002 last edited by

                Alright. Where is that setting that you can change to save RAMDisk data regularly to a storage device in case of power failure? If you compare the performance of the whole system, as a whole, would it be better to enable RAMDisk or just go with the normal saving to a HDD?

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

                  In Nano it's in the same place as the /var and /tmp ramdisk options, in System: Advanced: Miscellaneous: Originally that option was in Diagnostics: NanoBSD: which obviously doesn't appear on the standard 'full install' type. I don't have a full install to check that.

                  As Phil has said those options are there to make things more like Nano rather than for speed advantage. Though obviously a ram drive will be much faster than any standard drive type. If you were running a full install from a Disk On Module device you might want to move /var and /tmp to ram to reduce writes to the device.

                  In pfSense things mostly run in RAM anyway. I doubt you'll see much improvement in performance unless you have something custom going on.

                  Steve

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post

                  Products

                  • Platform Overview
                  • TNSR
                  • pfSense
                  • Appliances

                  Services

                  • Training
                  • Professional Services

                  Support

                  • Subscription Plans
                  • Contact Support
                  • Product Lifecycle
                  • Documentation

                  News

                  • Media Coverage
                  • Press
                  • Events

                  Resources

                  • Blog
                  • FAQ
                  • Find a Partner
                  • Resource Library
                  • Security Information

                  Company

                  • About Us
                  • Careers
                  • Partners
                  • Contact Us
                  • Legal
                  Our Mission

                  We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

                  Subscribe to our Newsletter

                  Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

                  © 2021 Rubicon Communications, LLC | Privacy Policy