linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "Linda A. Walsh" <lvm@tlinx.org>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: [linux-lvm] I/O accounting by partition: "-cow" & "-real" map to base or snapshot or ???
Date: Thu, 03 Oct 2013 12:31:41 -0700	[thread overview]
Message-ID: <524DC61D.9060704@tlinx.org> (raw)

I'm trying to display I/O data from /proc/diskstats
for regular, non-thin partitions, by lv_name.
"-cow" and "-real" bit confusing.  When I look at the
output of "dmsetup ls"  different minor devs for:
name                  minor
Home-real               2
Home                    3
Home-snapshot           5
Home-snapshot-cow       26

(snapshot=date+time snapshot was started)

I regularly see I/O on 'Home' & 'Home-real'.

write  =  "dd if=/dev/zero of=1G bs=1G count=1 oflag=direct"

A 1G write to Home shows 2GB I/O on 2 partitions:
  Home: 1G read
  Home-real: 1G read


Is this being double reported?  (i.e.
I should ignore one?)   Confusing is that they don't always
show the same amount of I/O.

A write to the same filename again showed 4GB I/O on 3 partitions:
  Home: 1G read + 1G write
  Home-real: 1G write
  Home-snap-cow: 1G write

Is there some read is copying off the
first copy to the "cow" partition? (with a 1G duplication somewhere?).

If I "overwrite"
   (dd if=/dev/zero of=1G bs=1G count=1 oflag=direct conv=nocreat)
I see the same numbers as on the initial file creation (to
both base and the "-real" partitions).

Could anyone clarify what's going on in the above scenarios?

(i.e. I would find each write being multiplied by 2 a bit
far fetched in terms of disk-BW;  Multiplied by 4... even less
likely I'd think...?  Thanks for any light-shed...;-)

                 reply	other threads:[~2013-10-03 19:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=524DC61D.9060704@tlinx.org \
    --to=lvm@tlinx.org \
    --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).