From: Tomasz Chmielewski <mangoo@wpkg.org>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: [linux-lvm] why LVM reads when I tell it to write?
Date: Mon, 23 Mar 2009 16:38:09 +0100 [thread overview]
Message-ID: <49C7ACE1.4070000@wpkg.org> (raw)
Why is LVM reading large amounts of data when I tell it to write only?
For example, this is what iostat shows when writing to a raw partition
(when doing "dd if=/dev/zero of=/dev/sdb5", iostat output every second):
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 80.81 0.00 5171.72 0 5120
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 78.00 0.00 4992.00 0 4992
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 81.82 0.00 5236.36 0 5184
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 77.00 0.00 4928.00 0 4928
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 79.21 0.00 5069.31 0 5120
This is what happens if we go through LVM - look how much is read before
it actually writes anything:
(when doing "dd if=/dev/zero of=/dev/test/test_volume").
What's interesting, if I add i.e. bs=64k to dd, I don't see these unexpected
reads on LVM any more. Why does it happen?
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 212.87 851.49 0.00 860 0
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 956.57 3826.26 0.00 3788 0
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 1083.84 4335.35 0.00 4292 0
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 1016.00 4064.00 0.00 4064 0
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 1035.64 4142.57 0.00 4184 0
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 1034.00 4136.00 0.00 4136 0
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 965.66 3862.63 0.00 3824 0
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 1025.00 4100.00 0.00 4100 0
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 991.92 3967.68 0.00 3928 0
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 1032.00 4128.00 0.00 4128 0
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 1009.90 4039.60 0.00 4080 0
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 366.33 1330.61 4040.82 1304 3960
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 1016.16 4060.61 76.77 4020 76
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 383.17 1394.06 4055.45 1408 4096
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 741.00 2904.00 1800.00 2904 1800
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 638.61 2475.25 2273.27 2500 2296
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 421.00 1560.00 3720.00 1560 3720
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 955.56 3802.02 501.01 3764 496
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 275.76 965.66 4016.16 956 3976
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 853.00 3384.00 840.00 3384 840
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 560.40 2130.69 3223.76 2152 3256
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 500.00 1907.07 2787.88 1888 2760
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 133.00 352.00 5296.00 352 5296
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 53.00 0.00 6244.00 0 6244
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 267.00 904.00 4840.00 904 4840
Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 52.00 0.00 6240.00 0 6240
--
Tomasz Chmielewski
http://wpkg.org
next reply other threads:[~2009-03-23 15:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-23 15:38 Tomasz Chmielewski [this message]
2009-03-23 21:23 ` [linux-lvm] why LVM reads when I tell it to write? Larry Dickson
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=49C7ACE1.4070000@wpkg.org \
--to=mangoo@wpkg.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 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.