All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] Does LVM-LV take system cache?
@ 2010-09-06 16:23 Kirby Zhou
  2010-09-06 20:16 ` [linux-lvm] Does LVM-LV take system cache? Sure Lars Ellenberg
  0 siblings, 1 reply; 3+ messages in thread
From: Kirby Zhou @ 2010-09-06 16:23 UTC (permalink / raw)
  To: 'Red Hat Enterprise Linux 5 (Tikanga) discussion
	mailing-list',
	'LVM general discussion and development'

[-- Attachment #1: Type: text/plain, Size: 909 bytes --]

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.

 

 

  Regards

  Kirby Zhou

 


[-- Attachment #2: Type: text/html, Size: 4201 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] Does LVM-LV take system cache? Sure.
  2010-09-06 16:23 [linux-lvm] Does LVM-LV take system cache? Kirby Zhou
@ 2010-09-06 20:16 ` Lars Ellenberg
  2010-09-07  5:49   ` Kirby Zhou
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Ellenberg @ 2010-09-06 20:16 UTC (permalink / raw)
  To: linux-lvm

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] Does LVM-LV take system cache? Sure.
  2010-09-06 20:16 ` [linux-lvm] Does LVM-LV take system cache? Sure Lars Ellenberg
@ 2010-09-07  5:49   ` Kirby Zhou
  0 siblings, 0 replies; 3+ messages in thread
From: Kirby Zhou @ 2010-09-07  5:49 UTC (permalink / raw)
  To: 'LVM general discussion and development'

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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-07  5:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.