Re: File writing performance
From: Bernard Dhooghe (nomen_at_attglobal.net)
Date: 10/30/03
- Next message: Richard D. Latham: "Re: ftp security"
- Previous message: goldfelda: "can't change limit on oracle user"
- In reply to: Lu: "File writing performance"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Oct 2003 03:32:26 -0800
See in comp.unix.aix about vmtune and numclust, maxrandwrt
vmtune is part of bos.adt.samples
The current default settings in AIX 4.3.3 ML11 is -c 0 -W 0
Example of test program with seeks and writes to timex and see how
changing the parms affects the elapsed time.
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/ioctl.h>
#define NWRITES 3000
extern int errno;
main(argc,argv)
int argc;
char *argv[];
{ int fd1,j,i=0;
int arg1;
char ar_1[1024000];
if(argc==1)
fd1=open("tmp0",O_WRONLY|O_TRUNC|O_CREAT);
if(fd1==-1) {printf("\nError %d on open %s \n",errno,ar_1);
exit(1);
}
for(i=0;i<1024;i++) ar_1[i]='1';
i=0;
for(i=0;i<NWRITES;i++)
{lseek(fd1,i*1024,SEEK_SET);
j=write(fd1,ar_1,1024);
if(j==-1) {printf("\n Error %d on write ",errno);break;
}
lseek(fd1,NWRITES*1024+i*1024,SEEK_SET);
j=write(fd1,ar_1,1024);
if(j==-1) {printf("\n Error %d on write ",errno);break;
}
}
printf("\nTotal writes is: %d\n",i);
}
Bernard Dhooghe
qlu@lgc.com (Lu) wrote in message news:<89ee3c55.0310281428.5f4a3eaf@posting.google.com>...
> Hi there,
>
> I got a program to write data to a randomly accessed file (the program
> moves file pointer to a certain position of the file according the
> current "keyword" and then writes data). It compiles and runs in Win2K
> and various Unix and Linux systems. The main program is in Fortran,
> calling a data writing library writen in C++.
>
> The weird thing is, it takes much longer elapse time (wall-clock time)
> than CPU time (e.g., 20 min vs. 2 min) in IBM-AIX (AIX4.3), while in
> all other systems, these two kinds of time are almost the same (e.g.
> 2min). The extra waiting in IBM machine does happen during file
> pointer locating and data writing stage. In all cases, this program is
> the only runing application during testing.
>
> Do you have any idea what may cause the long waiting time in IBM
> machine? It created a big performance headache for me now.
>
> Thanks for any suggestion.
>
> Regards,
> Lu
- Next message: Richard D. Latham: "Re: ftp security"
- Previous message: goldfelda: "can't change limit on oracle user"
- In reply to: Lu: "File writing performance"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|