Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: os io unit , db block size relation

Re: os io unit , db block size relation

From: FM <fabrizio.magni_at_mycontinent.com>
Date: Thu, 16 Sep 2004 18:59:11 GMT
Message-ID: <3ol2d.333738$5D1.14810469@news4.tin.it>

A little testing on a couple of machine: the experiment was reiterated several times.

/tmp/foo is a all zeros file

For the test I used a dd which lasted far less then the iostat interval.

oracle_at_pain:/tmp> dd if=/tmp/foo of=/tmp/foo2 bs=1024k count=50

oracle_at_pain:~> iostat -t -x /dev/sda 5

Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
/dev/sda 0.00 1.40 0.00 1.00 0.00 19.20 0.00 9.60

   19.20 50.06 60.00 10000.00 100.00

Time: 08:33:02 PM
avg-cpu: %user %nice %sys %idle

            0.50 0.00 4.30 95.20

Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
/dev/sda 0.00 2505.80 0.20 67.20 1.60 20584.00 0.80 10292.00

   305.42 96.54 690.50 148.37 100.00

Time: 08:33:07 PM
avg-cpu: %user %nice %sys %idle

            0.10 0.00 0.00 99.90

Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
/dev/sda 0.00 2.00 0.00 2.00 0.00 32.00 0.00 16.00

   16.00 50.14 70.00 5000.00 100.00

Relevant part:

at Time: 08:33:02 PM

wsec/s = 20584.00 (The number of sectors written per second) wrqm/s = 2505.80 (The number of write requests per second)

Dividing the two: 8,217
which is roughly 8 sectors of 512 byte (a write of 4096 byte)

I was using a linux x86 so PAGE_SIZE=4096 and filesystem block size 4k.

I'm relieved: during buffered i/o I'm doing call of 4k as theory claim (which should answer a question of tolga's).

I prefer to do writing instead of reading because they are not cached (not in this way) and they should be "physical".

In tolga's example he wasn't writing on a real disk so the metrics weren't really valid.

I still have to try the same with a dd support o_direct: the results should be different.

While for the file descriptor: dd is not using 0 for standard input, 1 for standard output and 2 for standard error. It substitutes 0 with if and 1 with of (below the evidence).

$ dd if=/dev/zero of=/dev/null

$ ps -fe|grep dd
dimon00 27017 26986 98 20:30 pts/1 00:00:05 dd if /dev/zero of /dev/null dimon00 27019 26950 0 20:30 pts/0 00:00:00 grep dd $ cd /proc/27017/fd/
$ ll
total 0

lrwx------    1 dimon00  dimon00        64 Sep 16 20:30 2 -> /dev/pts/1
l-wx------    1 dimon00  dimon00        64 Sep 16 20:30 1 -> /dev/null
lr-x------    1 dimon00  dimon00        64 Sep 16 20:30 0 -> /dev/zero

cat mantains the standard behaviour.

Fabrizio

PS: Have I ever told you that you have a really useful website? It helped me often.
Thank you for writing it.

-- 

Fabrizio Magni

fabrizio.magni_at_mycontinent.com

replace mycontinent with europe
Received on Thu Sep 16 2004 - 13:59:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US