Using trim on SSD drives in Puppy Linux

Moderator: Forum moderators

Post Reply
User avatar
bigpup
Moderator
Posts: 7298
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 951 times
Been thanked: 1613 times

Using trim on SSD drives in Puppy Linux

Post 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
.
.
.

Last edited by bigpup on Sun Jan 09, 2022 12:03 am, edited 1 time in total.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
bigpup
Moderator
Posts: 7298
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 951 times
Been thanked: 1613 times

Re: Using trim on SSD drives in Puppy Linux

Post 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!

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

Post Reply

Return to “File Management”