Page 1 of 1

Using trim on SSD drives in Puppy Linux

Posted: Sat Jan 08, 2022 4:26 pm
by bigpup

I will get this started.

The easy answer.

Run fstrim command every now and then from a terminal/console.

using fstrim weekly or even monthly is completely fine.
There is no need to use instant discard, or to trim daily - that would be a short-term measure, but this is about keeping the SSD happy in the long-term.

Code: Select all

fstrim -h

will bring up the help info on using it.

This is more info about trim in Linux:
https://kb.plugable.com/data-storage/tr ... d-in-linux

Example:
The SSD is identified as nvme0n1p6
Mount it by using Pmount or clicking the desktop icon for it.
The drive must be mounted so the file system on it is active.

This will do a dry run and give you output on what it finds needs trimed.

Code: Select all

fstrim -n /mnt/nvme0n1p6

This is the option to actually do trimming.

Code: Select all

fstrim -av /mnt/nvme0n1p6

.
.
Here is a small script program to use to do trim.
viewtopic.php?p=46796#p46796
.
.
.


Re: Using trim on SSD drives in Puppy Linux

Posted: Sat Jan 08, 2022 4:32 pm
by bigpup
maki wrote:

Trimming SSD Manually.(https://easylinuxtipsproject.blogspot.com/p/ssd.html)
Partitions must be mounted.

How to execute TRIM manually:
https://easylinuxtipsproject.blogspot.c ... d.html#ID7

1. Works for me .
Use it once a Week or every second Week.

1.
In Terminal:
fstrim -av

or 2. In Terminal (does not work for me......don`t know why):
fstrim -v /

Except from the Article above:

Prevent fragmentation, and DO NOT defrag
13. For an SSD, fragmentation of the file system is a smaller problem than for ordinary rotating hard disks. But it's nevertheless still a problem, so it's useful to prevent fragmentation as much as possible on an SSD, too.
You can achieve that by preserving a minimum of 20 % free space on each partition (item 4).

Regards!