From: "Kirby Zhou" <kirbyzhou@sohu-rd.com>
To: 'LVM general discussion and development' <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Does LVM-LV take system cache? Sure.
Date: Tue, 7 Sep 2010 13:49:45 +0800 [thread overview]
Message-ID: <0ed101cb4e50$79634450$6c29ccf0$@com> (raw)
In-Reply-To: <20100906201634.GC2377@racke>
Thanks very much,
the fact is actually what you said.
Regards,
Kirby Zhou
from SOHU-RD +86-10-6272-8261
-----Original Message-----
From: linux-lvm-bounces@redhat.com [mailto:linux-lvm-bounces@redhat.com] On
Behalf Of Lars Ellenberg
Sent: Tuesday, September 07, 2010 4:17 AM
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] Does LVM-LV take system cache? Sure.
On Tue, Sep 07, 2010 at 12:23:23AM +0800, Kirby Zhou wrote:
> Does LVM-LV take system cache?
>
> In my test, it does not take system cache on a RHEL5 box, is it a bug or a
> feature?
>
> Test1, run dd with raw block device, it seems system cache can boost up
> reread operation.
>
> [@djt_18_69 ~]# dd if=/dev/sdc bs=1M of=/dev/null count=500
> 524288000 bytes (524 MB) copied, 1.88267 seconds, 278 MB/s
> [@djt_18_69 ~]# dd if=/dev/sdc bs=1M of=/dev/null count=500
> 524288000 bytes (524 MB) copied, 0.13445 seconds, 3.9 GB/s
>
>
> Test2, run dd with lv, it seems system cache CAN NOT boost up reread
> operation.
>
> [@djt_18_69 ~]# dd if=/dev/vgext/lvtest5 bs=1M of=/dev/null count=500
> 524288000 bytes (524 MB) copied, 2.17848 seconds, 241 MB/s
> [@djt_18_69 ~]# dd if=/dev/vgext/lvtest5 bs=1M of=/dev/null count=500
> 524288000 bytes (524 MB) copied, 2.17451 seconds, 241 MB/s
>
> Both 2.6.18-164.15.1.el5 and 2.6.18-194.el5 do the same behavior.
The last close() on a block device releases its cache.
As for sdc dd is most likely not the exclusive user at that time
(any mounts or other references on sdc itself, or its partitions,
count), dd's close() does not have this effect there.
Try this:
# sleep 3600 < /dev/vgext/lvtest5 & sleep_pid=$!
# dd if=/dev/vgext/lvtest5 bs=1M of=/dev/null count=500
# dd if=/dev/vgext/lvtest5 bs=1M of=/dev/null count=500
# kill $sleep_pid
# dd if=/dev/vgext/lvtest5 bs=1M of=/dev/null count=500
Lars
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO@http://tldp.org/HOWTO/LVM-HOWTO/
prev parent reply other threads:[~2010-09-07 5:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-06 16:23 [linux-lvm] Does LVM-LV take system cache? Kirby Zhou
2010-09-06 20:16 ` [linux-lvm] Does LVM-LV take system cache? Sure Lars Ellenberg
2010-09-07 5:49 ` Kirby Zhou [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='0ed101cb4e50$79634450$6c29ccf0$@com' \
--to=kirbyzhou@sohu-rd.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).