You are not logged in.
The ArchWiki's section for ssds leaves an unclear message of enabling/disabling the discard or fstrim for NVMe drives:
Discards
Note: Although continuous TRIM is an option (albeit not recommended) for SSDs, NVMe devices should not be issued discards.
I have three SSD's: two nvme and one sata. According to this, don't know what based on, text, I shouldn't specify anywhere any discard/fstrim options for nvmes, but only for sata ssds. Is that correct? If it is correct, I'd like to know what this is based on. All the information in the internet is mostly saying to enable it for any ssd devices (either it is an NVMe or SATA), only archwiki and a few other articles are either in doubts or say not to enable. So I don't know what to do now.
Last edited by vityafx (2020-05-15 10:52:31)
Offline
What filesystem(s) are we taking about here?
Offline
I just use fstrim.timer that ships with util-linux. No discard mount options on any SSD (ext4 and f2fs).
Last edited by graysky (2020-05-15 10:14:48)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I am using ext4 filesystem. But would like to know the question in the topic for all the filesystems, if possible.
Offline
Red Hat recommends that you use batch or periodic discard.
Use online discard only if:
the system’s workload is such that batch discard is not feasible, or
online discard operations are necessary to maintain performance.
This would support what graysky said.
https://access.redhat.com/documentation … ge-devices
EDIT:
https://en.wikipedia.org/wiki/Trim_(computing)
Linux 2.6.28–25 December 2008[22] Initial support for discard operations was added for FTL NAND flash devices in 2.6.28. Support for the ATA TRIM command was added in 2.6.33.[23]
Not all filesystems make use of trim. Among the filesystems that can issue trim requests automatically are Ext4,[24] Btrfs,[25] FAT, GFS2, JFS,[26], XFS[27], and NTFS-3G. However, in some distributions, this is disabled by default due to performance concerns,[28] in favor of scheduled trimming on supported SSDs.[29] Ext3, NILFS2 and OCFS2 offer ioctls to perform offline trimming. The TRIM specification calls for supporting a list of trim ranges, but as of kernel 3.0 trim is only invoked with a single range that is slower.[30]
Last edited by Zod (2020-05-15 10:43:12)
Offline
The ArchWiki's section for ssds leaves an unclear message of enabling/disabling the discard or fstrim for NVMe drives:
Discards
Note: Although continuous TRIM is an option (albeit not recommended) for SSDs, NVMe devices should not be issued discards.I have three SSD's: two nvme and one sata. According to this, don't know what based on, text, I shouldn't specify anywhere any discard/fstrim options for nvmes, but only for sata ssds. Is that correct? If it is correct, I'd like to know what this is based on. All the information in the internet is mostly saying to enable it for any ssd devices (either it is an NVMe or SATA), only archwiki and a few other articles are either in doubts or say not to enable. So I don't know what to do now.
I believe the wiki article refers specifically to "continuous TRIM", i.e. the "discard" option for your filesystem of choice. This option is usually not recommended for any type of drive, be it SATA or NVMe.
What is recommended is to enable "periodic TRIM", i.e. fstrim.timer for example. This applies to both NVMe and SATA.
Offline