LukeShortCloud / winesapOS

winesapOS - Game with Linux anywhere, no installation required!
GNU General Public License v3.0
888 stars 30 forks source link

[install] Trim SSDs on a schedule #877

Closed LukeShortCloud closed 1 month ago

LukeShortCloud commented 1 month ago

Trimming ensures that SSDs continue to operate fast.

fstrim / -v

https://opensource.com/article/17/1/solid-state-drives-linux-enabling-trim-ssds

LukeShortCloud commented 1 month ago

Or maybe we only TRIM during an upgrade.

LukeShortCloud commented 1 month ago

For reference, Windows runs this once a month.

https://answers.microsoft.com/en-us/windows/forum/all/about-trimming-ssd/ab835a3b-fb60-4fd7-b902-0cd36486b1a2

The only downside to not TRIM'ing is that it is possible for the SSD to slow down if it has lots of writes. There are no downsides to not TRIM'ing. The easiest way for us to handle this is just running the fstrim command at the end of an upgrade (which we know will have a lot of writes). Otherwise, we can use a systemd timer set to run monthly.

GuestSneezeOSDev commented 1 month ago

setup a cron job which automates this task

LukeShortCloud commented 1 month ago

Good idea, cron would work great for this use-case!

LukeShortCloud commented 1 month ago

Actually, I did a quick search, and util-linux (installed by default on winesapOS) provides a weekly systemd timer! That means basically no work for us.

https://forum.manjaro.org/t/how-would-fstrim-timer-work-when-both-sdd-hdd-exist/138590

All we have to do is enable the fstrim.timer which will run fstrim.service weekly.

I'll enable that timer.

GuestSneezeOSDev commented 1 month ago

I need to close #921 pull request so I wont get This branch has conflicts that must be resolved issue Do not worry I will refork it and add the changes