public inbox for dm-crypt@saout.de
 help / color / mirror / Atom feed
From: Matthias Schniedermeyer <ms@citd.de>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] Streaming ciphers
Date: Sun, 16 Feb 2020 14:58:10 +0100	[thread overview]
Message-ID: <20200216135810.GA9235@citd.de> (raw)
In-Reply-To: <20200216023203.GA8407@tansi.org>

On 16.02.2020 03:32, Arno Wagner wrote:
> Hi David,
> 
> using LUKS should not result in write-amplification.
> LUKS uses 512B blocks and just provides an 1:1 mapping.

Using defaults it does cause a higher write-amplification.
By default dm-crypt doesn't not enable discard-support, whereas it is 
normaly supported for an unencrypted filesystem.

And given that at least some distributions even install a 
fstrim-cronjob, the filesystems are trimmed, even if not mounted with 
the discard-option.

This results in an unencrypted filesystem having it's empty space 
"empty", as far as the SSD is concerned.
Wheras "empty" space (either "is" or "stays") "used" for a LUKS device.

The "is" or "stays" difference comes with having the encrypted device 
pre-inited or not. With pre-init the blocks are always "in use". Without 
pre-init the blocks are "unused" as long as they aren't written and 
switch to "in use" after first beeing written, after which they will 
stay "in use" forever.

Less "empty" space results in higher write-amplification because the SSD 
has to remap "empty" space as it is "in use", as far as the SSD is 
concerned.

A pre-inited encrypted device, in this scenario, never has any empty 
space.


I'm not saying that you can't make it equivalent, just that there are 
differences when using the defaults.


> On Sun, Feb 16, 2020 at 01:59:41 CET, David Niklas wrote:
> > Hello,
> > Today I was helping a poor luser who's Crucial P1 QLC SSD died from
> > too many writes. We still don't know what's doing the writing, but he is
> > running luks using FDE so write amplification is definitely a
> > factor.
> > I forget the answer to this so please enlighten me, is there a streaming
> > cypher he can use instead of a block cipher? A better option that I
> > didn't consider?
> > Not that the TCG Opal is to be fully trusted (nor is it available on
> > that model), but how does it work with respect to write amplification vs.
> > luks?
> > 
> > Thanks,
> > David
> > _______________________________________________
> > dm-crypt mailing list
> > dm-crypt@saout.de
> > https://www.saout.de/mailman/listinfo/dm-crypt
> 
> -- 
> Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno@wagner.name
> GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
> ----
> A good decision is based on knowledge and not on numbers. -- Plato
> 
> If it's in the news, don't worry about it.  The very definition of 
> "news" is "something that hardly ever happens." -- Bruce Schneier
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> https://www.saout.de/mailman/listinfo/dm-crypt

-- 

Matthias

  reply	other threads:[~2020-02-16 14:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-16  0:59 [dm-crypt] Streaming ciphers David Niklas
2020-02-16  2:32 ` Arno Wagner
2020-02-16 13:58   ` Matthias Schniedermeyer [this message]
2020-02-17  3:56     ` David Niklas
2020-02-17 10:49       ` Matthias Schniedermeyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200216135810.GA9235@citd.de \
    --to=ms@citd.de \
    --cc=dm-crypt@saout.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox