Kitz Forum
Computer Software => Linux => Topic started by: Bowdon on August 23, 2017, 12:25:51 PM
-
I'm going to be testing Linux Mint soon on my old computer. I've been watching quite a few videos on how to install it.
When I install it on an ssd quite a few people on youtube keep mentioning about optimising it for ssd.
So my question is, does anyone have a clear and simple (very simple for me ;D ) guide to optimise linux mint for ssd?
-
This is quite good: https://wiki.archlinux.org/index.php/Solid_State_Drives
-
I found this useful guide to setting up trim on a recent Debian system, and it will very likely work on an Ubuntu-based system such as Mint. I've done this on my Debian Stretch system, and it all worked fine.
Command to trim an SSD:
sudo fstrim --all (or sudo fstrim -a)
Returns 0 (success), 32 (all failed) or 64 (some failed)
Commands to enable automatic trim:
A systemd .timer that will automatically run `fstrim -a` every week can be enabled in Debian with these commands:
sudo apt install util-linux
sudo cp /usr/share/doc/util-linux/examples/fstrim.{service,timer} /etc/systemd/system
sudo systemctl enable fstrim.timer
sudo systemctl start fstrim.timer
Check the status of the .timer with:
sudo systemctl list-timers
Stop the .timer from running automatically with:
sudo systemctl disable fstrim.timer
Read `man systemctl` & `man systemd.timer` for more on this.
-
a modern version of linux should do the 4k alignment for you, the only thing left is to mount with the discard flag which is needed for trim. :)
-
Some SSD drives have problems with continuous trim (the discard flag), and it's widely recommended to use periodic trim instead, as described in my reply number 2 above. This is discussed in the Arch Linux article I linked to earlier.
-
thanks for clarifying eric :)
just had a quick look at the article you posted and learnt something new, it explains why discard was never added as a default flag. :)
-
Yes, the Arch Linux documentation is very good.
-
In Ubuntu 16.04 and in Linux Mint 18.x automatic TRIM is enabled by default, when you install Ubuntu 16.04 or Linux Mint 18.x on an SSD. Namely by a weekly "cron job".