Navigation

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

    Fstrim for SSD

    Development
    2
    2
    1632
    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.
    • C
      cherrypie last edited by

      It would be nice to have a check box to enable a daily cron for fstrim in the advanced section.  What is fstrim you ask?

      TRIM allows the OS to inform a solid-state drive (SSD) which blocks of data are no longer considered in use and can be wiped internally. Without using TRIM, the SSD speed decreases after a while so if you have a solid-state drive that supports TRIM, you should enable it so your SSD remains fast over time.

      It would mean that fstrim would have to be included in install or possibly a 3rd party package.  A simple cron might look like this:

      #!/bin/sh
      LOG=/var/log/trim.log
      echo "*** $(date -R) ***" >> $LOG
      fstrim -v / >> $LOG

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

        Why would it be better to do it in userspace as you describe, rather than natively?

        Please see this http://forum.pfsense.org/index.php/topic,63656.0.html thread for background, but for 2.1 basically all you need to do is:

        
        A) Edit /boot/loader.conf.local to add ahci_load="YES"
        B) Reboot
        C) Perform the TRIM_set action at a shell:
        	touch /root/TRIM_set
             (if you need to remove: 	touch /root/TRIM_unset)
        D) Reboot
        E) Verify if TRIM is enabled with "tunefs -p /"
        

        I haven't checked out the 2.2 installer, but it's likely you will see an option to enable TRIM during install with 2.2

        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