On 07.11.2017 01:43, Michael Stone wrote:
> On Tue, Nov 07, 2017 at 01:00:54AM +0500, Alexander V. Makartsev wrote:
>> Now I wonder, why would anyone want to use TRIM feature on a portable
>> SSD,
>> especially on an encrypted one?
>> Isn't this feature only increases drive wear, offering next to
>> nothing as a
>> benefit in return?
>> I don't use TRIM feature on my systems because of that, and hope for
>> a firmware
>> of modern SSD will manage everything automatically. Am I wrong?
>
> TRIM should reduce, not increase, drive wear. (Since the drive knows
> that a particular block is unusued, it can write directly instead of
> having to read and rewrite an entire erase group.)
As I know SSDs are different in a way HDDs write their data. HDDs write
directly to the free block and are done. SSDs on the other hand will
have to erase free block first to get it ready for writing and then
write to it. This is because how NAND work. It's even worse, if a
destination block has some data on it already and there is some data
needs to be written onto it, then SSD will copy data already written,
then it will fully erase destination block, then it will concatenate
copied data with data to be written and finally will write merged data
to the block.
TRIM will erase blocks marked as deleted beforehand even if they are not
needed for writing right now. This overhead is the reason that causes
increased drive wear and decrease it's lifespan.

I do agree, that using fstune manually once in say half a year on a non
busy SSD could improve writing performance for some time, but using
discard or equivalent permanently in fstab is hardly worth it.

-- 
With kindest regards, Alexander.

⢀⣴⠾⠻⢶⣦⠀ 
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀⠀⠀⠀ 

Reply via email to