Linux LVM users
 help / color / mirror / Atom feed
From: Gionatan Danti <g.danti@assyoma.it>
To: Zdenek Kabelac <zkabelac@redhat.com>
Cc: "Dalebjörk, Tomas" <tomas.dalebjork@gmail.com>,
	"LVM general discussion and development" <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] exposing snapshot block device
Date: Wed, 23 Oct 2019 19:16:05 +0200	[thread overview]
Message-ID: <65a61709788b69c722572dac76cf02a2@assyoma.it> (raw)
In-Reply-To: <13d450bf-f6ad-7db8-eec1-88c4eb473287@redhat.com>

Il 23-10-2019 17:37 Zdenek Kabelac ha scritto:
> Hi
> 
> If you use 1MiB chunksize for thin-pool and you use  'dd' with proper 
> bs size
> and you write 'aligned' on 1MiB boundary (be sure you user  directIO,
> so you are not a victim of some page cache flushing...) - there should
> not be any useless read.
> 
> If you still do see such read - and you can easily reproduce this with
> latest kernel - report a bug please with your reproducer and results.
> 
> Regards
> 
> Zdenek

OK, I triple-checked my numbers and you are right: on a fully updated 
CentOS 7.7 x86-64 box with kernel-3.10.0-1062.4.1 and lvm2-2.02.185-2, 
it seems that the behavior I observed on older (>2 years ago) is not 
present anymore.

Take this original lvm setup:
[root@localhost ~]# lvs -o +chunk_size
   LV       VG     Attr       LSize   Pool     Origin Data%  Meta%  Move 
Log Cpy%Sync Convert Chunk
   root     centos -wi-ao----  <6.20g                                     
                         0
   swap     centos -wi-ao---- 512.00m                                     
                         0
   thinpool centos twi-aot---   1.00g                 25.00  14.16        
                     64.00k
   thinvol  centos Vwi-a-t--- 256.00m thinpool        100.00              
                         0

Taking a snapshot (lvcreate -s /dev/centos/thinvol -n thinsnap) and 
overwriting 1 MB of data on origin via "dd if=/dev/urandom 
of=/dev/centos/thinvol bs=1M count=32 oflag=direct" results in the 
following I/O to/from disk:

[root@localhost ~]# dstat -d -D sdc
---dsk/sdc---
  read  writ
1036k   32M

As you can see, while 1 MB was indeed read (due to metadata read?), no 
other read amplification occoured.

Now I got curious to see if zeroing behave in the same manner. So, I 
deleted thinsnap & thinvol, toggled zeroing on (lvchange -Zy 
centos/thinpool), and recreated thinvol:

[root@localhost ~]# lvs -o +chunk_size
   LV       VG     Attr       LSize   Pool     Origin Data%  Meta%  Move 
Log Cpy%Sync Convert Chunk
   root     centos -wi-ao----  <6.20g                                     
                         0
   swap     centos -wi-ao---- 512.00m                                     
                         0
   thinpool centos twi-aotz--   1.00g                 0.00   11.04        
                     64.00k
   thinvol  centos Vwi-a-tz-- 256.00m thinpool        0.00                
                         0

[root@localhost ~]# dstat -d -D sdc
--dsk/sdc--
  read  writ
    0    13M
  520k   19M

Again, no write amplificaton occoured.

Kudos to all the team for optimizing lvmthin in this manner, it really 
is a flexible and great performing tool.
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

      reply	other threads:[~2019-10-23 17:16 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-22 10:47 [linux-lvm] exposing snapshot block device Dalebjörk, Tomas
2019-10-22 13:57 ` Zdenek Kabelac
2019-10-22 15:29   ` Dalebjörk, Tomas
2019-10-22 15:36     ` Zdenek Kabelac
2019-10-22 16:13       ` Dalebjörk, Tomas
2019-10-23 10:26         ` Zdenek Kabelac
2019-10-23 10:56           ` Tomas Dalebjörk
2019-10-22 16:15       ` Stuart D. Gathman
2019-10-22 17:02         ` Tomas Dalebjörk
2019-10-22 21:38         ` Gionatan Danti
2019-10-22 22:53           ` Stuart D. Gathman
2019-10-23  6:58             ` Gionatan Danti
2019-10-23 10:06               ` Tomas Dalebjörk
2019-10-23 10:12             ` Zdenek Kabelac
2019-10-23 10:46         ` Zdenek Kabelac
2019-10-23 11:08           ` Gionatan Danti
2019-10-23 11:24             ` Tomas Dalebjörk
2019-10-23 11:26               ` Tomas Dalebjörk
2019-10-24 16:01               ` Zdenek Kabelac
2019-10-25 16:31                 ` Tomas Dalebjörk
2019-11-04  5:54                   ` Tomas Dalebjörk
2019-11-04 10:07                     ` Zdenek Kabelac
2019-11-04 14:40                       ` Tomas Dalebjörk
2019-11-04 15:04                         ` Zdenek Kabelac
2019-11-04 17:28                           ` Tomas Dalebjörk
2019-11-05 16:24                             ` Zdenek Kabelac
2019-11-05 16:40                         ` Mikulas Patocka
2019-11-05 20:56                           ` Tomas Dalebjörk
2019-11-06  9:22                             ` Zdenek Kabelac
2019-11-07 16:54                             ` Mikulas Patocka
2019-11-07 17:29                               ` Tomas Dalebjörk
2020-09-04 12:09                                 ` Tomas Dalebjörk
2020-09-04 12:37                                   ` Zdenek Kabelac
2020-09-07 13:09                                   ` Mikulas Patocka
2020-09-07 14:14                                     ` Dalebjörk, Tomas
2020-09-07 14:17                                       ` Zdenek Kabelac
2020-09-07 16:34                                         ` Tomas Dalebjörk
2020-09-07 16:42                                           ` Zdenek Kabelac
2020-09-07 17:37                                             ` Tomas Dalebjörk
2020-09-07 17:50                                               ` Zdenek Kabelac
2020-09-08 12:32                                                 ` Dalebjörk, Tomas
2020-09-07 19:56                                             ` Tomas Dalebjörk
2020-09-07 20:22                                               ` Tomas Dalebjörk
2020-09-07 21:02                                               ` Tomas Dalebjörk
2019-10-23 12:12             ` Ilia Zykov
2019-10-23 12:20             ` Ilia Zykov
2019-10-23 13:05               ` Zdenek Kabelac
2019-10-23 14:40                 ` Gionatan Danti
2019-10-23 15:46                   ` Ilia Zykov
2019-10-23 12:59             ` Zdenek Kabelac
2019-10-23 14:37               ` Gionatan Danti
2019-10-23 15:37                 ` Zdenek Kabelac
2019-10-23 17:16                   ` Gionatan Danti [this message]

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=65a61709788b69c722572dac76cf02a2@assyoma.it \
    --to=g.danti@assyoma.it \
    --cc=linux-lvm@redhat.com \
    --cc=tomas.dalebjork@gmail.com \
    --cc=zkabelac@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