File writing is slow

Hello Guru,

I am using a Pro*C program to prepare some reports
usaually the report file size is greater than 1GB.

But nowadays program is very slow.

I found out the program is taking much time to write data to file .....
is there any unix related reason to be slow down, the file writting ....??

Pls help me....

Could you please give us some more information ?

How frequent do you use fflush(file stream)
or leave it till the data buffer gets filled and flushed to the kernel buffer ?

Is file stream buffered ?

What is the difference in the performance - meaning - what is the time taken previously and to that of the current time taken ?

First, is the file being written to, or read-from & written to? Second, if the file is being appended to in chunks, is it being closed each time? Third, what is the file system (ext2, ufs, etc) this file is being stored on? (mount will usually tell you) Fourth, how much free space is on the filesystem? (df will tell you)