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: Yong Huang <yong321_at_yahoo.com>
Date: 17 Sep 2004 11:44:08 -0700
Message-ID: <b3cb12d6.0409171044.14069956@posting.google.com>


FM <fabrizio.magni_at_mycontinent.com> wrote in message news:<3ol2d.333738$5D1.14810469_at_news4.tin.it>...
> 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

>...

> 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).

Using iostat (wsec/s and wrqm/s) or (rsec/s and rrqm/s) values to calculate driver write or read chunk size is more accurate than what I suggested in my last message.

A slightly off-topic question. What if the filesystem block size is not 4k while PAGE_SIZE is 4096? (I had this question before for Solaris http://groups.google.com/groups?selm=b3cb12d6.0203181445.f3d2b36%40posting.google.com)

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

You mean he's writing to RAID? Shouldn't RAID be transparent to iostat?

>...

>
> Fabrizio
>
> PS: Have I ever told you that you have a really useful website? It
> helped me often.

Thanks for the compliments. Some of the stuff on my site is meant to attract recruiters. Real gurus may laugh at it.

Yong Huang Received on Fri Sep 17 2004 - 13:44:08 CDT

Original text of this message

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