linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Joe Pruett <joey@q7.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] advice for curing terrible snapshot performance?
Date: Fri, 12 Nov 2010 15:36:30 -0800	[thread overview]
Message-ID: <4CDDCF7E.4070006@q7.com> (raw)
In-Reply-To: <4CDDBF95.9040104@q7.com>

i just did a bit of poking around and discovered that snapshots have
their own chunk size that is used for the copy on write magic.  and it
defaults to 4k, and you can only increase that to 512k.  a simple test
of creating a 1g file went from 240mbytes/sec to 4mbytes/sec with 4k
chunk, and 12mbytes/sec with 512k chunk.  so i'm not sure what the
bottleneck is, but is surely is there.

On 11/12/2010 02:28 PM, Joe Pruett wrote:
> my understanding of how the lvm does snapshots is that a write causes a
> lookup to see if that extent is dirty or clean.  a dirty extent just
> writes directly, a clean extent causes a copy from the main volume to
> the snapshot volume and some amount of bookkeeping to track that the
> block is now dirty and then the write completes to the main lv.  so a
> test where you are creating a bunch of updates would cause a write to
> turn into a read and two writes, so i'd expect more like a 3x hit.  and
> i guess that the bookkeeping may have some sync calls in it, which could
> cause some major stalls as caches flush.
>
> have you tested the snapshots under normal load, and not test load?  you
> may be seeing the worst possible behavior (which is good to know), but
> may not really occur under typical usage.

  parent reply	other threads:[~2010-11-12 23:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-12 21:52 [linux-lvm] advice for curing terrible snapshot performance? chris (fool) mccraw
2010-11-12 22:28 ` Joe Pruett
2010-11-12 23:30   ` chris (fool) mccraw
2010-11-12 23:36   ` Joe Pruett [this message]
2010-11-13  0:17     ` chris (fool) mccraw
2010-11-13  0:58       ` Stuart D Gathman
2010-11-15 17:52         ` chris (fool) mccraw
2010-11-15 18:04           ` Romeo Theriault
2010-11-15 18:08           ` Joe Pruett
2010-11-15 18:18             ` chris (fool) mccraw
2010-11-15 23:51           ` Stuart D. Gathman
2010-11-16  0:09             ` chris (fool) mccraw
2010-11-15 18:05       ` chris (fool) mccraw
2010-11-15 14:35 ` Romeo Theriault
2010-11-15 17:46   ` chris (fool) mccraw
2010-11-15 20:37 ` Stephane Chazelas
2010-11-15 22:57   ` Stuart D. Gathman

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=4CDDCF7E.4070006@q7.com \
    --to=joey@q7.com \
    --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).