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

V2.1 - SSD friendly use of RAM disks - questions

Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
4 Posts 3 Posters 2.0k 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.
  • S
    stan-qaz
    last edited by Sep 16, 2013, 6:47 AM

    I noticed this addition here:  http://blog.pfsense.org/?p=712 and the settings for it on my pfSense box here: pfsense/system_advanced_misc.php

    Add optional ability for full installs to use RAM disks for /var/ and /tmp/ as is done on NanoBSD. Reduces overall writes to the media, should be more SSD-friendly

    I set mine up to 5X the minimum recommended size (200 and 300 MB) since I have lots of open RAM. My system hasn't been rebooted long or very busy so the usage is still pretty low.

    Output from df -h:

    
    /dev/md0        193M     88k    177M     0%    /tmp
    /dev/md1        290M     16M    250M     6%    /var
    
    

    Question: Is there a sweet spot that I should shoot for or just set them large enough that they don't fill up before being flushed?

    Just below the drive size settings is an option for the RRD graph data write intervals.

    This will periodically backup the RRD data so it can be restored automatically on the next boot. Keep in mind that the more frequent the backup, the more writes will happen to your media.

    Question: Is this data also backed up if you reboot from the console or the web interface?

    If it isn't automatically done is there a way to trigger a backup before you reboot?

    1 Reply Last reply Reply Quote 0
    • P
      phil.davis
      last edited by Sep 16, 2013, 7:25 AM

      Question: Is this data also backed up if you reboot from the console or the web interface?

      In /etc/rc.reboot and /etc/rc.shutdown

      # If we are not on a full install, or if the full install wants RAM disks, or if the full install _was_ using RAM disks, but isn't for the next boot...
      if [ "${PLATFORM}" != "pfSense" ] || [ ${USE_MFS_TMPVAR} -gt 0 ] || [ "${DISK_TYPE}" = "md" ]; then
              /etc/rc.backup_rrd.sh
              /etc/rc.backup_dhcpleases.sh
      fi
      
      

      Yes, on a clean shutdown or reboot it saves RRD and DHCP lease data.
      If, like me, you get unexpected power interruptions and care about the RRD data, then use the periodic backup also.

      As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
      If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

      1 Reply Last reply Reply Quote 0
      • S
        stan-qaz
        last edited by Sep 16, 2013, 7:32 AM

        Great, I'll set it for four hours and see how that goes. Thanks for the info on where to look for this stuff too.

        1 Reply Last reply Reply Quote 0
        • J
          jimp Rebel Alliance Developer Netgate
          last edited by Sep 19, 2013, 6:19 PM

          For sizing, it really depends on a few factors. The most important is how many packages you are going to install and what packages they are.

          If you run something like squid, you'll need a LOT more /var space. If you install large packages, you'll need to have more room there for the install process in /var and /tmp to manage the files they grab.

          Log files and RRD do not grow once they are initialized. If you add an interface or a gateway, you would gain some more RRD graphs, but that doesn't happen too often, and you'd have to have your drives nearly full for that to be a concern.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          2 out of 4
          • First post
            2/4
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
            This community forum collects and processes your personal information.
            consent.not_received