Re: max-io-size
From: utkanbir (hopehope_123_at_yahoo.com)
Date: 09/29/04
- Next message: Sadrul H C: "Re: Forking Java GUI Apps"
- Previous message: Benjamin D. LeMasurier: "Re: numlock"
- In reply to: Jens.Toerring_at_physik.fu-berlin.de: "Re: max-io-size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Sep 2004 23:17:59 -0700
Hi Jens ,
Thanks for your mail. In fact , i make little search and came to your
point .
I think the system calls such as pread or readv are not the lowest
level calls during disk io , these functions also call driver io
routines. I use oracle database and ocfs (oracle clustered file
system) , this is a file system device driver running on linux and
uses unbuffered io - uses O_DIRECT flag . What i want to understand is
, how much data the filesystem transfers in each read operation from
the device.
For windows , i know that io at the kernel level is done by using irp
(io request packets if i remember correctly) , but i dont know
anything about the linux model.
How can i get more info about linux kernel. I am looking for :
1. Is there anyway to monitor linux disk cache ? Either by programming
or utility?
2. How can i learn linux driver model?
Kind Regards,
hope
Jens.Toerring@physik.fu-berlin.de wrote in message news:<2qtn83F144ru3U1@uni-berlin.de>...
> utkanbir <hopehope_123@yahoo.com> wrote:
> > I try to understand the max-io-size of my linux systems .
>
> > Here is my config:
>
> > Server1: 4 -Itanium64 cpus , 8gb.ram , ext2 and ocfs file systems ,
> > emc , raid10 , redhat advanced 2.1
>
> > Server2 : 4 intel xeon cpus , 4gb.ram , ext3 file system.
>
> > This is my small test program:
>
> > #include<stdio.h>
> > #include <fcntl.h>
> > #include<errno.h>
> > #include<sys/vfs.h>
> > main()
> > {
> > FILE *f ;
> > int i,size;
> > struct statfs st;
> > char buffer[4194304];
> > size=0;
> > statfs("t.ykb",&st);
> > printf("filetype:%X,optimal transfer block size:%d,number of
> > blocks
> > in file system:%d,free blocks in os :%
> > d\n",st.f_type,st.f_bsize,st.f_blocks,st.f_bfree);
> > i = open("t.ykb",O_RDWR,0600);
> > printf("errno:%d\n",errno);
> > size=read(i,buffer,4194304);
> > printf("bytes read:%d\n",size);
> > }
>
> > I compile this code by using :
>
> > gcc t.c -o t
>
> > and run strace with time output:
>
> > strace -T t
>
> > First of all , can this program measure the max-io-size on linux? Is
> > the logic correct?
>
> I can't see how this should measure max-io-size. Even with strace
> you only see the system calls, not what's happening internally in
> the kernel. When you ask for 5 GB of data from the disk in one
> read() it will return with 5 GB (if there are that many in the
> file) no matter how and in how many and how large chunks it gets
> read physically from the disk.
>
> Wouldn't be the number you're looking for what can find e.g. in
> /proc/ide/hda/settings under max_kb_per_request (but I don't
> have any real idea, since I don't even know exactly what
> max-io-size is supposed to mean, so I am just guessing)?
>
> > Thinkng that the first answer is ok , here is the problem:
>
> > On itanium box , the code fails by dumping core if i try to read
> > something > 7mb.
>
> > On xeon box it fails if i read something > 16mb.
>
> I would guess it's related to some stack overflow - you might be
> using too much memory for automatic variables. Just try with an
> allocated buffer instead of an automatic array to be on the safe
> side.
> Regards, Jens
- Next message: Sadrul H C: "Re: Forking Java GUI Apps"
- Previous message: Benjamin D. LeMasurier: "Re: numlock"
- In reply to: Jens.Toerring_at_physik.fu-berlin.de: "Re: max-io-size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|