Subj : io transfer test To : comp.os.linux From : hopehope_123 Date : Tue Sep 14 2004 06:01 am Hi , 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 #include #include #include 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? 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. This is the strace output of xeon box: statfs("t.ykb", {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=83436880, f_bfree=75315827, f_bavail=71077479, f_files=42385408, f_ffree=42299381, f_fsid={0, 0}, f_namelen=255, f_frsize=0}) = 0 <0.000431> fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 <0.000014> mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75e6000 <0.000015> write(1, "filetype:EF53,optimal transfer b"..., 116filetype:EF53,optimal transfer block size:4096,number of blocks in file system:83436880,free blocks in os :75315827 ) = 116 <0.000018> open("t.ykb", O_RDWR) = 3 <0.000015> write(1, "errno:0\n", 8errno:0 ) = 8 <0.000016> read(3, "CEKILIS_GRUP_KOD|VERDE_KOD|CEKIL"..., 9000000) = 9000000 <0.021780> write(1, "bytes read:9000000\n", 19bytes read:9000000 ) = 19 <0.000019> Does this mean that the os read 9MB. at once? Do you think such a big value is possible? I need to measure this value in order to reconfigure my oracle database disk architecture. Kind Regards, hope .