Re: max-io-size

From: utkanbir (hopehope_123_at_yahoo.com)
Date: 09/29/04


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



Relevant Pages

  • kernel Doc/ URL corrections
    ... -Documents about softnet driver issues in general can be found ... Additional documentation is available at Don Becker's Linux Drivers site: ... Just force it to be recognized by kernel parameters. ... Keywords: files, VFS, file operations, kernel interface, character ...
    (Linux-Kernel)
  • Re: differences between kernel-tree and kernel-source and kernel image
    ... > will this install the kernel or try to patch an existing 2.6 kernel or ... affix-source - Driver source for the Affix Bluetooth protocol stack for Linux ... atlas-doc - Automatically Tuned Linear Algebra Software,documentation ...
    (Debian-User)
  • Re: eradicating out of tree modules
    ... crashes of "the Linux kernel" caused by some binary-only driver. ... This harms the reputation of Linux as being stable. ... for breaking out-of-tree open source modules is throwing out the baby ...
    (Linux-Kernel)
  • Re[2]: 2.6.16 serious consequences / GPL_EXPORT_SYMBOL / USB drivers of major vendor excluded
    ... is only truly feasible in kernel space. ... Even though people might do realtime DSP things in user space with Linux ... using usbfs directly, no kernel driver needed. ... release your code under this same license. ...
    (Linux-Kernel)
  • Re: 2.6.16-rc2-mm1: crash on suspend
    ... I've got a kernel crash when trying to suspend to disk. ... Mandriva Linux release 2006.1 for i586, ... # ACPI Support ... # Generic Driver Options ...
    (Linux-Kernel)

Loading