#SSD_TRIM_support definitely needs improvement

1) Periodic trim is already enabled by default

2) No mention of differences between periodic and continuous trim. Continuous trim is often not recommended.

3) On btrfs, discard=sync is enabled by default and using discard (or discard=sync) is discouraged

Pigeon (talk) 15:54, 6 June 2025 (UTC)Reply

Also,  from man mount(8):
noatime
Do not update inode access times on this filesystem (e.g. for faster access on the news spool to speed up news servers). This works for all inode types (directories too), so it implies nodiratime.
Hence everything stated above renders the whole Filesystems#SSD TRIM support section mostly redundant. I am a wiki noob so i hesitate take any actions myself. What do you think? Pigeon (talk) 16:07, 6 June 2025 (UTC)Reply
Good catch, I updated the section.
On point number 3, I am seeing that on btrfs `discard=async` is what is set to as default. Pigs (talk) 16:44, 6 June 2025 (UTC)Reply
> On point number 3, I am seeing that on btrfs `discard=async` is what is set to as default.
Exactly. A typo on my side.
Also it seems that discard=sync is BTRFS-specific. From what i can see after doing a bit of googling continuous trim is commonly enabled with discard option so we should just not mention discard=sync in that section. Pigeon (talk) 17:24, 6 June 2025 (UTC)Reply
I think it is reasonable to leave `discard=sync` as a user might see `discard=async` and think they should remove it. Pigs (talk) 17:43, 6 June 2025 (UTC)Reply
the thing is that `discard=async` is also a continuous trim. It addresses main problems that synchronous trim has, but is still generally not recommended. Even Fedora, one of the main btrfs adopters, uses fstrim and does not set `discard=async` by default.
Continuous and periodic trim modes can be enabled simultaneously, this scenario is covered by the responsible developers. I think mentioning `discard=sync` as it is right now is unnecessary.
It can get complicated in the end. If the goal of this wiki is focusing on explaining how to accomplish something in nix-specific way, it would be beneficial to just link Arch Wiki that covers nearly everything when on this matter. Or if i am misunderstanding the purpose of `nixos` wiki, then we need to provide more details in this section. For example, btrfs page does not cover fstrim and `discard=async`, so we need to either be exhaustive, or not go beyond the sufficient minimum. Please, coordinate my understanding Pigeon (talk) 18:03, 6 June 2025 (UTC)Reply
Return to "Filesystems" page.