Raw i/o usage wrecks block device performance??

From: Chris Evans (chris@scary.beasts.org)
Date: Wed Oct 11 2000 - 15:28:57 EST


Here's a very strange (and repeatable) result. Affects 2.2.x + raw device
patches (i.e. RH7.0). Also had a similar effect on 2.4.0test9!

The problem is best described with a little sequence. After using raw i/o
facilities, streamed block device reads from the same underlying device
exhibit much poorer performance than before the raw i/o.


[root@localhost /root]# hdparm -t /dev/hda

 Timing buffered disk reads: 64 MB in 3.81 seconds = 16.80 MB/sec
[root@localhost /root]# time dd if=/dev/raw/raw1 of=/dev/null bs=1024k
64+0 records in
64+0 records out

real 0m2.990s
user 0m0.010s
sys 0m0.450s
[root@localhost /root]# hdparm -t /dev/hda

 Timing buffered disk reads: 64 MB in 6.12 seconds = 10.46 MB/sec

The read figures before and after the raw i/o are repeatable with only
little jitter.

Raw device reads are consistent and not affected by this phenomena.

Anyone know what's going on? Looks like a bug or inefficiency somewhere in
the kernel.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

This archive was generated by hypermail 2b29 : Sun Oct 15 2000 - 21:00:19 EST