linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Question about thin-pool/thin LV with stripes
@ 2019-01-23 13:40 Eric Ren
  2019-01-24 14:54 ` Eric Ren
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Ren @ 2019-01-23 13:40 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1578 bytes --]

Hello,

I created thin LVs with 2 stripes on two PVs as follows:

```
lvcreate --yes --zero=n --type=thin-pool --name=mythinpool
--extents=90%FREE --chunksize=512K --poolmetadatasize=1G --stripes=2
--stripesize=4K vg0
...
# lvs -o+stripes -a
  LV                 VG  Attr       LSize    Pool       Origin Data%
Meta%  Move Log Cpy%Sync Convert #Str
  RootVolume         vg0 Vwi-a-t---   10.00g mythinpool        1.36
                               0
  [lvol0_pmspare]    vg0 ewi-------    2.00g
                              1
  mythinpool         vg0 twi-aot--- <175.77g                   0.08   0.79
                              1
  [mythinpool_tdata] vg0 Twi-ao---- <175.77g
                              2
  [mythinpool_tmeta] vg0 ewi-ao----    2.00g
                              1

# dmsetup table
vg0-mythinpool: 0 368607232 linear 252:2 0
vg0-RootVolume: 0 20971520 thin 252:2 1
vg0-mythinpool-tpool: 0 368607232 thin-pool 252:0 252:1 1024 71993 1
skip_block_zeroing
vg0-mythinpool_tdata: 0 368607232 striped 2 8 254:16 4458496 254:32 264192
vg0-mythinpool_tmeta: 0 4194304 linear 254:16 188762112
```

As you can see, only "mythinpool_tdata" LV has 2 stripes. Is that OK?
If I want to benefit performance from stripes, will it works for me? Or,
should I create dataLV, metadata LV, thinpool and thin LV using
step-by-step way
and specify "--stripes 2" in every steps?

Besides, is there anything I should take care of to extend the VG/thin-pool
with *striped thin-LV*
when out of space?

Any suggestion would be very appreciated, thanks in advance!

Regards,
Eric Ren

[-- Attachment #2: Type: text/html, Size: 2452 bytes --]

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

* Re: [linux-lvm] Question about thin-pool/thin LV with stripes
  2019-01-23 13:40 [linux-lvm] Question about thin-pool/thin LV with stripes Eric Ren
@ 2019-01-24 14:54 ` Eric Ren
  2019-01-24 15:06   ` Eric Ren
  2019-01-25 21:47   ` Zdenek Kabelac
  0 siblings, 2 replies; 6+ messages in thread
From: Eric Ren @ 2019-01-24 14:54 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 976 bytes --]

Hi,

As you can see, only "mythinpool_tdata" LV has 2 stripes. Is that OK?
> If I want to benefit performance from stripes, will it works for me? Or,
> should I create dataLV, metadata LV, thinpool and thin LV using
> step-by-step way
> and specify "--stripes 2" in every steps?
>

With single command to create thin-pool, the metadata LV is not created
with striped
target. Is this designed on purpose, or just the command doesn't handle
this case very
well for now?

My main concern here is, if the metadata LV use stripped target, can
thin_check/thin_repair tools work fine?


>
> Besides, is there anything I should take care of to extend the
> VG/thin-pool with *striped thin-LV*
> when out of space?
>

In this case, I should always vgextend the VG with 2 PVs, because thin pool
will find the half-of-extending-size
of free space on 2 seperate PVs for striping. If just adding one PV, the
free space in VG cannot be used
to extend the 2-striped thin-pool.

Thanks,
Eric

[-- Attachment #2: Type: text/html, Size: 1743 bytes --]

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

* Re: [linux-lvm] Question about thin-pool/thin LV with stripes
  2019-01-24 14:54 ` Eric Ren
@ 2019-01-24 15:06   ` Eric Ren
  2019-01-25 21:53     ` Zdenek Kabelac
  2019-01-25 21:47   ` Zdenek Kabelac
  1 sibling, 1 reply; 6+ messages in thread
From: Eric Ren @ 2019-01-24 15:06 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

Hi,

With single command to create thin-pool, the metadata LV is not created
> with striped
> target. Is this designed on purpose, or just the command doesn't handle
> this case very
> well for now?
>
> My main concern here is, if the metadata LV use stripped target, can
> thin_check/thin_repair tools work fine?
>

In our use scenario, we want to use DM thinp for a lot of containers as
rootfs. The container use heavy on snapshots,
so above 4K thin/snapshots LVs may share the thin pool concurrently.

This may make the space fragmented. So, another concern is, will using
striped thinp make
fragmentation much more worse?

Thanks!
Eric

[-- Attachment #2: Type: text/html, Size: 1120 bytes --]

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

* Re: [linux-lvm] Question about thin-pool/thin LV with stripes
  2019-01-24 14:54 ` Eric Ren
  2019-01-24 15:06   ` Eric Ren
@ 2019-01-25 21:47   ` Zdenek Kabelac
  1 sibling, 0 replies; 6+ messages in thread
From: Zdenek Kabelac @ 2019-01-25 21:47 UTC (permalink / raw)
  To: LVM general discussion and development, Eric Ren

Dne 24. 01. 19 v 15:54 Eric Ren napsal(a):
> Hi,
> 
>     As you can see, only "mythinpool_tdata" LV has 2 stripes. Is that OK?
>     If I want to benefit performance from stripes, will it works for me? Or,
>     should I create dataLV, metadata LV, thinpool and thin LV using
>     step-by-step way
>     and specify "--stripes 2" in every steps?
> 
> 
> With single command to create thin-pool, the metadata LV is not created with 
> striped
> target. Is this designed on purpose, or just the command doesn't handle this 
> case very
> well for now?
> 

Hi

Yes this on purpose currently.

When you create 'thin-pool' - you are mostly specifying options for 'DATA' 
volume. The allocation of metadata is using 'internals' to pick the place
and other properties -  we can maybe introduce some policy option
to make metadata raid1 or striped or something like that.

ATM it's not so easy to do the best possible allocation - so
for skilled admin - it's always most 'secure' to build pool
from bricks - data LV + meta LV.

The automatic allocation will get enhanced over the time - but it's
always somewhere 'fuzzy' what is going to be the results.

Basically - what is 'unspecified' on command line and left for lvm2 to figure 
out - may change between releases - if we consider there is better solution.

Zdenek

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

* Re: [linux-lvm] Question about thin-pool/thin LV with stripes
  2019-01-24 15:06   ` Eric Ren
@ 2019-01-25 21:53     ` Zdenek Kabelac
  2019-01-26  3:36       ` Eric Ren
  0 siblings, 1 reply; 6+ messages in thread
From: Zdenek Kabelac @ 2019-01-25 21:53 UTC (permalink / raw)
  To: LVM general discussion and development, Eric Ren

Dne 24. 01. 19 v 16:06 Eric Ren napsal(a):
> Hi,
> 
>     With single command to create thin-pool, the metadata LV is not created
>     with striped
>     target. Is this designed on purpose, or just the command doesn't handle
>     this case very
>     well for now?
> 
>     My main concern here is, if the metadata LV use stripped target, can
>     thin_check/thin_repair tools work fine?
> 
> 
> In our use scenario, we want to use DM thinp for a lot of containers as 
> rootfs. The container use heavy on snapshots,
> so above 4K thin/snapshots LVs may share the thin pool concurrently.
> 
> This may make the space fragmented. So, another concern is, will using striped 
> thinp make
> fragmentation much more worse?

Hi

When 'stripe_size' is the 'right size' - striped device should appear faster,
but telling you what's the best size is some sort of 'black magic'  :)

Basically - strip size should match boundaries of thin-pool chunk sizes.

i.e. for thin-pool with 128K chunksize -  and 2 disks -
I'd assume best result you should get with 64K stripesize (so 2 disks will 
make it 128K stripe)  - but it depends on number of hw aspects.

So you will need to benchmark it.

Zdenek

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

* Re: [linux-lvm] Question about thin-pool/thin LV with stripes
  2019-01-25 21:53     ` Zdenek Kabelac
@ 2019-01-26  3:36       ` Eric Ren
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Ren @ 2019-01-26  3:36 UTC (permalink / raw)
  To: Zdenek Kabelac; +Cc: LVM general discussion and development

[-- Attachment #1: Type: text/plain, Size: 584 bytes --]

Hi Zdenek,

When 'stripe_size' is the 'right size' - striped device should appear
> faster,
> but telling you what's the best size is some sort of 'black magic'  :)
>
> Basically - strip size should match boundaries of thin-pool chunk sizes.
>
> i.e. for thin-pool with 128K chunksize -  and 2 disks -
> I'd assume best result you should get with 64K stripesize (so 2 disks will
> make it 128K stripe)  - but it depends on number of hw aspects.
>
> So you will need to benchmark it.
>

 Thanks a lot for your input! Very helpful points to take more
consideration~

Best regards,
Eric

[-- Attachment #2: Type: text/html, Size: 965 bytes --]

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

end of thread, other threads:[~2019-01-26  3:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-23 13:40 [linux-lvm] Question about thin-pool/thin LV with stripes Eric Ren
2019-01-24 14:54 ` Eric Ren
2019-01-24 15:06   ` Eric Ren
2019-01-25 21:53     ` Zdenek Kabelac
2019-01-26  3:36       ` Eric Ren
2019-01-25 21:47   ` Zdenek Kabelac

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