Artix Linux Forum

Artix Linux => System => Topic started by: nick on 26 December 2020, 17:17:18

Title: [SOLVED] How to enable weekly fstrim service?
Post by: nick on 26 December 2020, 17:17:18
hello,
I deed search the forum but unable to find a post on the argument

I deed find few page on the web but not concerning arch:
1 (https://www.techsupportpk.com/2016/08/how-to-configure-periodic-trim-for-ssd-storage-on-linux-servers.html)
2 (https://www.digitalocean.com/community/tutorials/how-to-configure-periodic-trim-for-ssd-storage-on-linux-servers)

this can apply to artix openrc too?

any suggeastion or better link or command on how to do?

thanks
Title: Re: How to enable weekly fstrim service?
Post by: alium on 26 December 2020, 19:54:53
learn some facts about trim  ;) https://wiki.archlinux.org/index.php/Solid_state_drive#TRIM
you need no service, if you enable Continuous TRIM
Title: Re: How to enable weekly fstrim service?
Post by: nick on 26 December 2020, 20:35:43
Yes, I knew regarding continuous trim or discard option, but from many side instead there is advice to use periodic  or manual...

forgot to tell I'm using a nvme ssd with trim support  :)

From Arch (https://wiki.archlinux.org/index.php/Solid_state_drive/NVMe):

Discards
Note: Although continuous TRIM is an option (albeit not recommended) for SSDs, NVMe devices should not be issued discards.
Title: Re: How to enable weekly fstrim service?
Post by: alium on 26 December 2020, 21:06:50
in this case use cron https://blog.100tb.com/how-to-keep-your-ssds-fast-with-trim-on-linux

you need install and enable cronie-openrc or fcron-openrc too.

Edit: you can extend sript to
Code: [Select]
/usr/bin/fstrim -av > /var/log/trim.log || true
to see, if it really works
Title: Re: How to enable weekly fstrim service?
Post by: nick on 26 December 2020, 21:39:32
Thanks