Hi,

>From the list I already have learned, that most of my concerns regarding
the lifetime and maintainance to prolong it are without a
reason.

Nonetheless I am interested in the technique as such.

My SSD (NVme/M2) is ext4 formatted and I found articles on the
internet, that it is neither a good idea to activate the "discard"
option at mount time nor to do a fstrim either at each file deletion
no triggered by a cron job.

Since there seems to be a "not so good point in time", when to do a
fstrim, I think there must also be a point in time, when it is quite
right to fstrim the mu SSD.

fstrim clears blocks, which currently are not in use and which
contents is != 0.

The more unused blocks there are, which has a contents != 0, the
lesser the count of blocks is, which the wear leveling algorithm can
use for its purpose.

That leads to the conclusion: to fstrim as often as possible, to keep the
count of empty blocks as high as possible.

BUT: Clearing blocks is an action, which includes writes to the cells of
the SSD.

Which is not that nice.

Then, do a fstrim just in the moment, when there is no useable block
left.

Then the wear-leveling algorithm is already at its limits.

Which is not that nice either.

The truth - as so often - is somewhere in between.  

Is it possible to get an information from the SSD, how many blocks are
in the state of "has contents" and "is unused" and how many blocks are
in the state of "has *no* contents" and "is unused"?

Assuming this information is available: Is it possible to find the
sweat spot, when to fstrim SSD?

Cheers!
Meino




Reply via email to