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

    SSD noatime mount

    Scheduled Pinned Locked Moved Hardware
    9 Posts 6 Posters 2.5k 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.
    • A
      athurdent
      last edited by

      So my CF card broke and I got a cheap Sandisk SSD instead. I used the full 2.1.3 install, turned on AHCI, TRIM support and RAM disks for /tmp and /var. After a few weeks I noticed that the SSD had written nearly 40GB already, which is odd as I only upgraded to 2.1.4 after install. I suspected vnstat2, it has a cron job that writes every minute, so I set it to every hour using the cron package. I did also install freeradius2 and zabbix2-agent when setting the new box up, but it didn't seem that they were writing too much.
      The Total_LBAs_Written counter didn't stop increasing every minute though.
      So I dug around the net a little and maybe came up with a solution that could help other SSD users and should not harm anything (please correct me if I'm wrong).

      As soon as I mounted my root partition with "noatime" the counter stopped increasing.

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        We mount the slices on NanoBSD with noatime, but not on a full install, though it's a good idea to save on writes. On a full install you'll also have continuous writes to the HDD for log files and RRD files.

        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
        • D
          dstroot
          last edited by

          Umm - how do I change the SSD mount to use "noatime"?  I'd like to do the same.  Thx.

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

            On a full install? Edit /etc/fstab. Add the 'noatime' switches to the mounted filesystems.

            Steve

            1 Reply Last reply Reply Quote 0
            • ?
              Guest
              last edited by

              @dstroot:

              Umm - how do I change the SSD mount to use "noatime"?  I'd like to do the same.  Thx.

              You may want to also read these articles, they contain additional useful information.
              http://tldp.org/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/chap6sec73.html
              http://lonesysadmin.net/2013/12/08/gain-30-linux-disk-performance-noatime-nodiratime-relatime/

              nodiratime and relatime might be more suitable depending on the programs that you are running and their expectations from the file system.

              On almost all my machines I use these instructions to improve hard disk performance (in most instances more than 10%) or premature wear and tear.

              Halea

              1 Reply Last reply Reply Quote 0
              • ?
                Guest
                last edited by

                @jimp:

                We mount the slices on NanoBSD with noatime, but not on a full install, though it's a good idea to save on writes. On a full install you'll also have continuous writes to the HDD for log files and RRD files.

                Jim, (et al)
                Is there a page/document that explains the implementation differences between the nano version and the regular version to discover maybe more good tricks about how to better handle flash disks or SSDs?
                Also, are the packages different when you install them from within pfsense with the package manager whether you are running the nano version or the regular? I am curious to know if those packages are equally optimized for reduced storage access.
                Thanks.
                Halea

                1 Reply Last reply Reply Quote 0
                • C
                  charliem
                  last edited by

                  @haleakalas:

                  nodiratime and relatime might be more suitable depending on the programs that you are running and their expectations from the file system.

                  These are linux specific, not available in FreeBSD AFAIK.

                  1 Reply Last reply Reply Quote 0
                  • jimpJ
                    jimp Rebel Alliance Developer Netgate
                    last edited by

                    @haleakalas:

                    Is there a page/document that explains the implementation differences between the nano version and the regular version to discover maybe more good tricks about how to better handle flash disks or SSDs?
                    Also, are the packages different when you install them from within pfsense with the package manager whether you are running the nano version or the regular? I am curious to know if those packages are equally optimized for reduced storage access.

                    https://doc.pfsense.org/index.php/Full_Install_and_NanoBSD_Comparison

                    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
                    • ?
                      Guest
                      last edited by

                      Thanks Jim. That's what I was looking for.
                      Thanks Charlie for the correction. My mind was elsewhere thinking about SSD optimization rather than pfSense and FreeBSD. To tell you the truth I didn't even know that they were not available in FreeBSD, it's good to know. We have been dealing with another batch of zapped SSD drives lately after less than a couple of years of field use and when we tried to get to the bottom of the problem this was one route that we investigated. Anyway… Thanks for the correction and info.
                      Halea

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