linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] swap on thin-provisioning
@ 2020-11-29  0:18 Chris Murphy
  2020-11-29 12:52 ` Gionatan Danti
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Murphy @ 2020-11-29  0:18 UTC (permalink / raw)
  To: LVM general discussion and development

Hi,

Is it expected that swap on a thin volume should work? I'm guessing
the answer is no because mkswap doesn't come with any sort of
allocation request that would set the LE to PE mapping.

What about a swapfile (on ext4 or XFS) onr a thin volume? In this
case, I'd expect fallocate would set the LE to PE mapping, and it
should work. But does it work for both paging and hibernation files?

And what's the implication if the thin volume were to be snapshot?

Thanks,

-- 
Chris Murphy

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] swap on thin-provisioning
  2020-11-29  0:18 [linux-lvm] swap on thin-provisioning Chris Murphy
@ 2020-11-29 12:52 ` Gionatan Danti
  2020-11-29 15:12   ` Sreyan Chakravarty
  2020-11-29 16:19   ` Nicholas Geovanis
  0 siblings, 2 replies; 5+ messages in thread
From: Gionatan Danti @ 2020-11-29 12:52 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Chris Murphy

Il 2020-11-29 01:18 Chris Murphy ha scritto:
> What about a swapfile (on ext4 or XFS) onr a thin volume? In this
> case, I'd expect fallocate would set the LE to PE mapping, and it
> should work. But does it work for both paging and hibernation files?

If things did not change, fallocate does *not* allocate PE space (ie: 
they are not passed down to the underlying thin pool).

Moreover, I expect for a memory-starved machine to page out pool 
metadata (right?) so I would not use a thin volume for swap.

Regards.

-- 
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.danti@assyoma.it - info@assyoma.it
GPG public key ID: FF5F32A8

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] swap on thin-provisioning
  2020-11-29 12:52 ` Gionatan Danti
@ 2020-11-29 15:12   ` Sreyan Chakravarty
  2020-11-30  8:39     ` Gionatan Danti
  2020-11-29 16:19   ` Nicholas Geovanis
  1 sibling, 1 reply; 5+ messages in thread
From: Sreyan Chakravarty @ 2020-11-29 15:12 UTC (permalink / raw)
  To: LVM general discussion and development


[-- Attachment #1.1: Type: text/plain, Size: 662 bytes --]

On Sun, 29 Nov 2020, 6:23 pm Gionatan Danti, <g.danti@assyoma.it> wrote:

> Il 2020-11-29 01:18 Chris Murphy ha scritto:
> > What about a swapfile (on ext4 or XFS) onr a thin volume? In this
> > case, I'd expect fallocate would set the LE to PE mapping, and it
> > should work. But does it work for both paging and hibernation files?
>
> If things did not change, fallocate does *not* allocate PE space (ie:
> they are not passed down to the underlying thin pool).
>
> Moreover, I expect for a memory-starved machine to page out pool
> metadata (right?) so I would not use a thin volume for swap.
>
> Regards.
>


What about a swap file allocated with dd??

>
>

[-- Attachment #1.2: Type: text/html, Size: 1231 bytes --]

[-- Attachment #2: Type: text/plain, Size: 197 bytes --]

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] swap on thin-provisioning
  2020-11-29 12:52 ` Gionatan Danti
  2020-11-29 15:12   ` Sreyan Chakravarty
@ 2020-11-29 16:19   ` Nicholas Geovanis
  1 sibling, 0 replies; 5+ messages in thread
From: Nicholas Geovanis @ 2020-11-29 16:19 UTC (permalink / raw)
  To: LVM general discussion and development


[-- Attachment #1.1: Type: text/plain, Size: 1185 bytes --]

IIRC at VMWare vSphere 5 and before, swap could not be located on their
type of thin logical volume. Nor could it swap to a linux LVM volume on top
of that.
It just couldnt perform well. That later changed.

On Sun, Nov 29, 2020, 6:53 AM Gionatan Danti <g.danti@assyoma.it> wrote:

> Il 2020-11-29 01:18 Chris Murphy ha scritto:
> > What about a swapfile (on ext4 or XFS) onr a thin volume? In this
> > case, I'd expect fallocate would set the LE to PE mapping, and it
> > should work. But does it work for both paging and hibernation files?
>
> If things did not change, fallocate does *not* allocate PE space (ie:
> they are not passed down to the underlying thin pool).
>
> Moreover, I expect for a memory-starved machine to page out pool
> metadata (right?) so I would not use a thin volume for swap.
>
> Regards.
>
> --
> Danti Gionatan
> Supporto Tecnico
> Assyoma S.r.l. - www.assyoma.it
> email: g.danti@assyoma.it - info@assyoma.it
> GPG public key ID: FF5F32A8
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>
>

[-- Attachment #1.2: Type: text/html, Size: 2063 bytes --]

[-- Attachment #2: Type: text/plain, Size: 197 bytes --]

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] swap on thin-provisioning
  2020-11-29 15:12   ` Sreyan Chakravarty
@ 2020-11-30  8:39     ` Gionatan Danti
  0 siblings, 0 replies; 5+ messages in thread
From: Gionatan Danti @ 2020-11-30  8:39 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Sreyan Chakravarty

Il 2020-11-29 16:12 Sreyan Chakravarty ha scritto:
> 
> What about a swap file allocated with dd??

If thinpool metadata can be paged out (which I don't know for sure), 
swap on thinvol can potentially deadlock.

-- 
Danti Gionatan
Supporto Tecnico
Assyoma S.r.l. - www.assyoma.it
email: g.danti@assyoma.it - info@assyoma.it
GPG public key ID: FF5F32A8

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-11-30  8:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-29  0:18 [linux-lvm] swap on thin-provisioning Chris Murphy
2020-11-29 12:52 ` Gionatan Danti
2020-11-29 15:12   ` Sreyan Chakravarty
2020-11-30  8:39     ` Gionatan Danti
2020-11-29 16:19   ` Nicholas Geovanis

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).