Mailinglist Archive: opensuse-features (199 mails)

< Previous Next >
[openFATE 321838] Support TRIM/discard mode when installing to SSD
Feature changed by: Peter Simons (psimons)
Feature #321838, revision 7
Title: Support TRIM/discard mode when installing to SSD

openSUSE Distribution: Rejected by Tomáš Chvátal (scarabeus_iv)
reject reason: See last comment.
Priority
Requester: Desirable

Requested by: Peter Simons (psimons)
Partner organization: openSUSE.org

Description:
While installing Tumbleweed (and Leap 42.2) with an encrypted disk,
there is no way to enable TRIM/discard mode the for the underlying SSD.
I *can* specify the "discard" mount option in the expert partitioner
mode, but I cannot add the necessary "--allow-discards" option to the
call to "cryptsetup" anywhere. Only *after* booting the newly installed
system it's possible to enable that feature, and even then I have to
manually edit /etc/crypttab to do it.

Business case (Partner benefit):
openSUSE.org: TRIM mode allows modern SSDs to operate faster than they
can without it.
There are security implications when combined with LUKS encryption, but
having that ability as an optional feature sure is desirable (and many
other distributions support it, too).

Discussion:
#1: Martin Pluskal (pluskalm) (2017-06-12 17:39:51)
This behaviour is afaik intentional - enabling discard as mount
option/or with luks can lead to premature degradation of many ssd
devices - on other hand fstrim from util linux has service/timer which
will trigger it periodically which is in most cases sufficient and
safe.

#2: Peter Simons (psimons) (2017-06-12 19:58:56) (reply to #1)
Actually, it's the other way round. TRIM was invented to *prevent* SSD
degradation and to improve both longevity and performance of SSD
drives, i.e. by combating Write Amplification.
https://en.wikipedia.org/wiki/Write_amplification has some details.
Running fstrim via cron alleviates these issues to some degree, but
it's certainly not the same thing as using TRIM continuously. It feels
really weird that openSUSE does not take advantage of these features
which have been around (and are standard practice in other
distributions) for several years now.

#3: Martin Pluskal (pluskalm) (2017-06-12 20:25:01) (reply to #2)
Intention and implementation sadly differ - there are plenty of ssd
drives with faulty trim implementations see [1][2] and it is often
recommended against enabling this unless one is sure that his drive is
not among faulty ones.
1. https://forums.freebsd.org/threads/56951/#post-328912 2.
https://wiki.debian.org/SSDOptimization

+ #4: Peter Simons (psimons) (2017-06-12 22:41:17) (reply to #3)
+ Yes, I am sure SSDs with broken firmware exist. That is a compelling
+ reason to not enable TRIM features unconditionally. Instead, users
+ should have the option to enable use of TRIM if they want to. The
+ reason I created this FATE entry is because openSUSE's installer does
+ not allow its users to do that.




--
openSUSE Feature:
https://features.opensuse.org/321838

< Previous Next >
This Thread
References