this post was submitted on 18 Oct 2023
216 points (97.0% liked)

linuxmemes

20880 readers
2 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 1 year ago (1 children)

Yeah, the man page doesn't really help me out.

   fstrim is used on a mounted filesystem to discard (or "trim")
   blocks which are not in use by the filesystem. This is useful for
   solid-state drives (SSDs) and thinly-provisioned storage.

   By default, fstrim will discard all unused blocks in the
   filesystem. Options may be used to modify this behavior based on
   range or size, as explained below.

   The mountpoint argument is the pathname of the directory where
   the filesystem is mounted and is required when -A, -a, --fstab,
   or --all are unspecified.

   Running fstrim frequently, or even using mount -o discard, might
   negatively affect the lifetime of poor-quality SSD devices. For
   most desktop and server systems a sufficient trimming frequency
   is once a week. Note that not all devices support a queued trim,
   so each trim command incurs a performance penalty on whatever
   else might be trying to use the disk at the time.

For instance, why would unused blocks not be discarded? And what does "discarded" even mean in this context? But it does recommend against using it for SSDs so I think I'll skip it.

[–] [email protected] 2 points 1 year ago (1 children)

"this is useful for solid-state drives"
Where is it not recommended?

Or did I just miss something?

[–] [email protected] 2 points 1 year ago

Running fstrim frequently, or even using mount -o discard, might negatively affect the lifetime of poor-quality SSD devices.

I guess it was recommending against frequent runs.