Is TRIM enabled for ssds on new installs?

I’m not well versed in this, but I’m wondering with almost everyone using nvmes/ssds, is trim enabled by default or if we have to manually enable it.

I ran systemctl status fstrim.timer but it shows its inactive.

Hello @helpcomputer :wink:

Here is along tread about that:

Thats the conclusion in my opinion:

So not all SSDs work with fstrim, therefore enabling it is a user choice.

Check this: Solid state drive - ArchWiki

2 Likes

Thank you for your post. I just wnated to clarify two things with you if you don’t mind (as I said, I’m not well versed in this stuff)

  1. To enable TRIM, the only thing i have to do is type in the terminal: sudo systemctl enable --now fstrim.timer

As an aside, what’s the difference between fstrim.timer and fstrim.service? Do I need to enable both (or does enabling one automatically enable the other?

  1. This will activate trim for all my ssds. I have 3 drives and I don’t think I need to enable trim on each individually. Is that correct?

The timer activates the service on a weekly basis.

It will go through all current mounts and runs fstrim if they support the discards option.

You can check with the following command which drives will be used:

sudo fstrim --listed-in /etc/fstab:/proc/self/mountinfo --dry-run --verbose
1 Like