LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   discard vs. fstrim.timer with multiboot SSD (https://www.linuxquestions.org/questions/linux-general-1/discard-vs-fstrim-timer-with-multiboot-ssd-4175655926/)

mrmazda 06-17-2019 09:57 PM

discard vs. fstrim.timer with multiboot SSD
 
The search services don't seem able to connect multi-boot or multiboot with fstrim in any single thread. Has anyone here considered whether discard or timer makes more sense with a bunch of OSes on single SSD systems that get booted to random OSes for random lengths of time? If timer, what period(s) make sense? Discard seems to make more sense to me, but I only just today gave it any thought, while I've been using SSDs for about a year. It took me over 6 months to even face the issue of trimming. Everything I have now is using the defaults, whatever they may be on a mix of Debians and derivatives, Mageia and Fedora, but mostly openSUSE. Most of what I have are upgrades, few fresh installs since migrating off rotating rust, so no instances of fstabs with discard in the options column. Most root filesystems here are on EXT4, none on BTRFS. MBRs here are a mix of legacy and GPT.

Thoughts?

wpeckham 06-18-2019 04:32 PM

Mount options only take effect in and during the running of the OS in which they are defined. Multiboot does not make them either more or less valid. Perhaps your purpose would be better served if you refine your question. I am not sure that I understand your objective.

mrmazda 06-19-2019 01:09 AM

I thought the objective was clear enough: to acquire any available information helpful in choosing among among discard options for numerous filesystems per SSD, all of which get wildly irregular use:
  1. manual discard
  2. automatic discard via fstab
  3. automatic discard via systemd, and if so, what timer setting to use
How the SSD handles sector allocation under the covers, or whether it matters WRT discard methods, so far has been unclear to me.

wpeckham 06-19-2019 05:38 AM

Fair enough, but my point was that the answers do not depend upon having a single OS, or a multiboot setup.

This is only my opinion based upon my experiences, so YMMV.
I find continuous trim (fstab) a bit of a performance hit. Since a big part of the reason for using it in the first place involves performance that would seem to make that particular automation less than optimal.

A scheduled process seems more optimal for this. A completely manual process may work for you, but only if you are somewhat religious in your routine (as I am). For a laptop or desktop workstation that boots at least weekly and automated on-boot process (systemd can be set that way) seems perfect.

You should consider your work profile in making this decision. How many blocks you write to disk in a day MIGHT make a big difference.


All times are GMT -5. The time now is 02:15 PM.