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:
Code: [Select]
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