OPNsense Forum

English Forums => Hardware and Performance => Topic started by: rabievdm on August 14, 2020, 10:19:11 AM

Title: SSD and Trim on current releases
Post by: rabievdm on August 14, 2020, 10:19:11 AM
I was looking through the forums and documentation and whilst I could find references to TRIM on SSD's I couldn't really work out how to enable it?

Does it get set automatically or if not where should I go and set it?
Title: Re: SSD and Trim on current releases
Post by: Patrick M. Hausen on August 14, 2020, 11:19:58 AM
FreeBSD supports TRIM out of the box, no need to enable it.

You can check the status like this:

root@opnsense:~ # tunefs -p /
[...]
tunefs: trim: (-t)                                         enabled
[...]


Kind regards,
Patrick
Title: Re: SSD and Trim on current releases
Post by: banym on August 14, 2020, 11:46:55 AM
Btw. Trim should only make most sense with highly frequented storage.
Should not be the case with "normal" firewall setup.

Nevertheless it is supported by default.
Title: Re: SSD and Trim on current releases
Post by: franco on August 14, 2020, 12:02:49 PM
If the disk allows it OPNsense will try to enable it. If you don't want it, you need to edit /etc/fstab and add "# notrim" at the end of the disk line.


Cheers,
Franco
Title: Re: SSD and Trim on current releases
Post by: rabievdm on August 20, 2020, 01:00:52 PM
Thanks all, looks like we are golden:

tunefs -p /
tunefs: trim: (-t)                                         enabled