LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: Strage buffer behaviour
@ 2007-11-14 11:02 Tomasz Chmielewski
0 siblings, 0 replies; 5+ messages in thread
From: Tomasz Chmielewski @ 2007-11-14 11:02 UTC (permalink / raw)
To: LKML
Denys Vlasenko wrote:
> On Sunday 11 November 2007 11:33, Tino Keitel wrote:
>> The dd command reads 100 MB from each partition two times in a row. It
>> looks like sda1 and sda2 are not bufferd (the first 4 dd runs), but
>> sda3 and sda4 are (the last 4 dd runs).
>>
>> The computer is a Mac mini with a 2,5" SATA hard disk. The first 2
>> partitions contain EFI and MacOS X, and are unused in Linux. The last 2
>> partitions are an ext3 partition for / and an LVM for the rest of the
>> sytem.
>>
>> Any hints how the dd/buffering behaviour could be explained? The system
>> was mostly idle, and the numbers are reproducible across reboots.
>
> IIRC only mounted partitions' reads are cached.
Or, in general, those devices which kernel actually "uses" (mounted, but
also LVM, RAID, which don't have to be mounted to get cached).
--
Tomasz Chmielewski
http://lists.wpkg.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Strage buffer behaviour
2007-11-12 19:44 ` Denys Vlasenko
@ 2007-11-12 20:46 ` Heikki Orsila
0 siblings, 0 replies; 5+ messages in thread
From: Heikki Orsila @ 2007-11-12 20:46 UTC (permalink / raw)
To: Denys Vlasenko; +Cc: Tino Keitel, linux-kernel
On Mon, Nov 12, 2007 at 12:44:53PM -0700, Denys Vlasenko wrote:
> IIRC only mounted partitions' reads are cached.
That seems to be the case. Thanks.
--
Heikki Orsila Barbie's law:
heikki.orsila@iki.fi "Math is hard, let's go shopping!"
http://www.iki.fi/shd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Strage buffer behaviour
2007-11-11 18:33 Tino Keitel
2007-11-11 19:39 ` Heikki Orsila
@ 2007-11-12 19:44 ` Denys Vlasenko
2007-11-12 20:46 ` Heikki Orsila
1 sibling, 1 reply; 5+ messages in thread
From: Denys Vlasenko @ 2007-11-12 19:44 UTC (permalink / raw)
To: Tino Keitel; +Cc: linux-kernel
On Sunday 11 November 2007 11:33, Tino Keitel wrote:
> The dd command reads 100 MB from each partition two times in a row. It
> looks like sda1 and sda2 are not bufferd (the first 4 dd runs), but
> sda3 and sda4 are (the last 4 dd runs).
>
> The computer is a Mac mini with a 2,5" SATA hard disk. The first 2
> partitions contain EFI and MacOS X, and are unused in Linux. The last 2
> partitions are an ext3 partition for / and an LVM for the rest of the
> sytem.
>
> Any hints how the dd/buffering behaviour could be explained? The system
> was mostly idle, and the numbers are reproducible across reboots.
IIRC only mounted partitions' reads are cached.
--
vda
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Strage buffer behaviour
2007-11-11 18:33 Tino Keitel
@ 2007-11-11 19:39 ` Heikki Orsila
2007-11-12 19:44 ` Denys Vlasenko
1 sibling, 0 replies; 5+ messages in thread
From: Heikki Orsila @ 2007-11-11 19:39 UTC (permalink / raw)
To: linux-kernel
On Sun, Nov 11, 2007 at 07:33:35PM +0100, Tino Keitel wrote:
> I noticed that the kernel (2.6.23.1) seems to buffer only certain
> partitions on my system:
>
> $ for i in 1 2 3 4 ; do for j in 1 2 ; do dd if=/dev/sda$i of=/dev/null
> bs=1024k count=100 ; done ; done
> 100+0 records in
> 100+0 records out
> 104857600 bytes (105 MB) copied, 3.01471 seconds, 34.8 MB/s
> 100+0 records in
> 100+0 records out
> 104857600 bytes (105 MB) copied, 2.86945 seconds, 36.5 MB/s
> 100+0 records in
> 100+0 records out
> 104857600 bytes (105 MB) copied, 2.92038 seconds, 35.9 MB/s
> 100+0 records in
> 100+0 records out
> 104857600 bytes (105 MB) copied, 3.00272 seconds, 34.9 MB/s
> 100+0 records in
> 100+0 records out
> 104857600 bytes (105 MB) copied, 4.07722 seconds, 25.7 MB/s
> 100+0 records in
> 100+0 records out
> 104857600 bytes (105 MB) copied, 0.0944248 seconds, 1.1 GB/s
> 100+0 records in
> 100+0 records out
> 104857600 bytes (105 MB) copied, 5.61527 seconds, 18.7 MB/s
> 100+0 records in
> 100+0 records out
> 104857600 bytes (105 MB) copied, 0.331822 seconds, 316 MB/s
>
> The dd command reads 100 MB from each partition two times in a row. It
> looks like sda1 and sda2 are not bufferd (the first 4 dd runs), but
> sda3 and sda4 are (the last 4 dd runs).
Strange.. I'm running 2.6.24-rc1 here. Reading data from /dev/hda1
caches well, but not from /dev/sd[ab]1.
PS. you can flush caches with:
echo 1 > /proc/sys/vm/drop_caches
--
Heikki Orsila Barbie's law:
heikki.orsila@iki.fi "Math is hard, let's go shopping!"
http://www.iki.fi/shd
^ permalink raw reply [flat|nested] 5+ messages in thread
* Strage buffer behaviour
@ 2007-11-11 18:33 Tino Keitel
2007-11-11 19:39 ` Heikki Orsila
2007-11-12 19:44 ` Denys Vlasenko
0 siblings, 2 replies; 5+ messages in thread
From: Tino Keitel @ 2007-11-11 18:33 UTC (permalink / raw)
To: linux-kernel
Hi folks,
I noticed that the kernel (2.6.23.1) seems to buffer only certain
partitions on my system:
$ for i in 1 2 3 4 ; do for j in 1 2 ; do dd if=/dev/sda$i of=/dev/null
bs=1024k count=100 ; done ; done
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 3.01471 seconds, 34.8 MB/s
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 2.86945 seconds, 36.5 MB/s
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 2.92038 seconds, 35.9 MB/s
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 3.00272 seconds, 34.9 MB/s
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 4.07722 seconds, 25.7 MB/s
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 0.0944248 seconds, 1.1 GB/s
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 5.61527 seconds, 18.7 MB/s
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 0.331822 seconds, 316 MB/s
The dd command reads 100 MB from each partition two times in a row. It
looks like sda1 and sda2 are not bufferd (the first 4 dd runs), but
sda3 and sda4 are (the last 4 dd runs).
The computer is a Mac mini with a 2,5" SATA hard disk. The first 2
partitions contain EFI and MacOS X, and are unused in Linux. The last 2
partitions are an ext3 partition for / and an LVM for the rest of the
sytem.
Any hints how the dd/buffering behaviour could be explained? The system
was mostly idle, and the numbers are reproducible across reboots.
Regards,
Tino
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-11-14 11:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-14 11:02 Strage buffer behaviour Tomasz Chmielewski
-- strict thread matches above, loose matches on Subject: below --
2007-11-11 18:33 Tino Keitel
2007-11-11 19:39 ` Heikki Orsila
2007-11-12 19:44 ` Denys Vlasenko
2007-11-12 20:46 ` Heikki Orsila
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).