All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: dm-devel@redhat.com
Subject: Re: [PATCH v3 12/12] dm snapshot: merge a linear region of chunks using one large IO
Date: Tue, 17 Nov 2009 11:20:44 -0500	[thread overview]
Message-ID: <20091117162043.GA5223@redhat.com> (raw)
In-Reply-To: <1258474344-10886-13-git-send-email-snitzer@redhat.com>

On Tue, Nov 17 2009 at 11:12am -0500,
Mike Snitzer <snitzer@redhat.com> wrote:

> s->store->type->prepare_merge returns the number of chunks that can be
> linearly copied starting from the returned chunk number backward. (but
> the caller is allowed to copy less, and the caller puts the number of
> copied chunks to s->store->type->commit_merge)
> 
> I.e. if returned chunk numbers are old_chunk == 10 and new_chunk == 20
> and returned value is 3, then chunk 20 can be copied to 10, chunk 19 to
> 9 and 18 to 8.
> 
> s->merge_write_interlock_n has now been allowed to be increased up to
> the full range of chunks returned from s->store->type->prepare_merge.
> Until now kcopyd was only ever allowed to copy one chunk at a time;
> as a result snapshot-merge performance was extremely slow.
> 
> Also, snapshot_merge_process() needs to delay the merging of _all_
> chunks that have in-progress writes; not just the first chunk in the
> region that is to be merged.
> 
> snapshot-merge performance is now very respectible.

s/respectible/respectable/

Also, I removed the following from the patch header but it helps show
how "respectable" snapshot-merge performance is with this patch:

Here are performance results from some mkfs-based testing:

# lvcreate -n testlv -L 32G test
# lvcreate -n testlv_snap -s -L 7G test/testlv

# time mkfs.ext3 /dev/test/testlv
...
real    1m7.827s
user    0m0.116s
sys     0m11.017s

# lvs
 LV          VG   Attr   LSize  Origin Snap%  Move Log Copy%  Convert
 testlv      test owi-a- 32.00G
 testlv_snap test swi-a-  7.00G testlv   9.05

before:
-------
# time lvconvert --merge test/testlv_snap
 Merging of volume testlv_snap started.
 ...
 Merge into logical volume testlv finished.
 Logical volume "snapshot1" successfully removed

real    22m33.100s
user    0m0.045s
sys     0m0.711s


after:
------
# time lvconvert --merge test/testlv_snap
 Merging of volume testlv_snap started.
 testlv: Merged: 6.4%
 testlv: Merged: 3.5%
 testlv: Merged: 0.9%
 testlv: Merged: 0.0%
 Merge into logical volume testlv finished.
 Logical volume "snapshot1" successfully removed

real    1m0.881s
user    0m0.015s
sys     0m0.560s

  reply	other threads:[~2009-11-17 16:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-17 16:12 [PATCH v3 00/12] snapshot-merge target Mike Snitzer
2009-11-17 16:12 ` [PATCH v3 01/12] dm exception store: add snapshot-merge specific methods Mike Snitzer
2009-11-17 16:12 ` [PATCH v3 02/12] dm exception store: snapshot-merge usage accounting Mike Snitzer
2009-11-17 16:12 ` [PATCH v3 03/12] dm snapshot: add snapshot-merge target Mike Snitzer
2009-11-17 16:12 ` [PATCH v3 04/12] dm snapshot: merge target should not allocate new exceptions Mike Snitzer
2009-11-17 16:12 ` [PATCH v3 05/12] dm snapshot: do not allow more than one merging snapshot Mike Snitzer
2009-11-17 16:12 ` [PATCH v3 06/12] dm snapshot: the merge procedure Mike Snitzer
2009-11-17 16:12 ` [PATCH v3 07/12] dm snapshot: queue writes to an area that is actively being merged Mike Snitzer
2009-11-17 16:12 ` [PATCH v3 08/12] dm snapshot: do not merge a chunk until active writes to it finish Mike Snitzer
2009-11-17 16:12 ` [PATCH v3 09/12] dm snapshot: make exceptions in other snapshots when merging Mike Snitzer
2009-11-17 16:12 ` [PATCH v3 10/12] dm snapshot: make exceptions if merge is dispatching to origin Mike Snitzer
2009-11-17 16:12 ` [PATCH v3 11/12] dm snapshot: redirect accesses to origin if merging snap invalidated Mike Snitzer
2009-11-17 16:12 ` [PATCH v3 12/12] dm snapshot: merge a linear region of chunks using one large IO Mike Snitzer
2009-11-17 16:20   ` Mike Snitzer [this message]
2009-11-17 20:35 ` [PATCH v3 13/12] dm snapshot: avoid __minimum_chunk_size() during merge Mike Snitzer
2009-11-19 11:25 ` [PATCH v3 00/12] snapshot-merge target Andi Kleen
2009-11-19 14:02   ` Mike Snitzer
2009-11-19 14:53     ` Alasdair G Kergon
2009-11-19 17:45       ` Mike Snitzer
2009-11-19 16:08     ` Andi Kleen

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=20091117162043.GA5223@redhat.com \
    --to=snitzer@redhat.com \
    --cc=dm-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.