linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Xen <list@xenhideout.nl>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: [linux-lvm] swap on lvm cache
Date: Tue, 26 Apr 2016 22:35:15 +0000	[thread overview]
Message-ID: <1878ee4357f761c330210f82e80ead3d@dds.nl> (raw)

Just a weird question here.

Since swap should ordinarily be encrypted if you encrypt any part of 
your data at all, I have opted at this point to either put it inside a 
volume that might end up getting cached, or to disable that cache and 
put the swap in its place.

What I am saying is that in my current scheme there is going to be a 
small cache drive and one part of the cache drive is going to serve 
unencrypted data and the other part is going to serve encrypted data.

Supposing that, the swap would be in the encrypted part. But using cache 
(lvmcache) on swap is completely ludicrous right?

Swap content might change so fast and so often that with regular 
parameters (that would need to be identical for the entire encrypted 
container) it would never make it to the cache.

More, accessing swap means loading it into RAM and then clearing the 
swap part. Therefore, theoretically perhaps unless the promotion values 
are 0, there would never be any benefit because swap is always write 
once read once.

Then again, that means there is no pain in adding swap to it either, 
because it will never get cached.

Maybe it could be considered an innocent or innocuous element. Doesn't 
hurt you, doesn't provide any benefit. In Dutch we say "Baat het niet, 
dan schaadt het niet."

Alternatively you could put the swap on the SSD (in this case) and not 
have any cache for the other part of the drive. What do you think? It 
makes no sense and it makes no difference, right.

Regards, Bart.

             reply	other threads:[~2016-04-26 22:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26 22:35 Xen [this message]
2016-04-27  8:38 ` [linux-lvm] swap on lvm cache Zdenek Kabelac
2016-04-27 10:32   ` Xen

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=1878ee4357f761c330210f82e80ead3d@dds.nl \
    --to=list@xenhideout.nl \
    --cc=linux-lvm@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).