All,
Thanks a lot for your valuable suggestion.
i am using open call with O_RDWR mode. and using lseek to locate the offset.
According to the behavior of process i feel that problem is file system caching/paging. The first time the program is run it takes far longer to execute than any subsequent runs.
Is there any way to by-pass the file system caching, or something like direct I/O for redhat linux machine??
Files that are frequently read are under the same directory.
My data is in very simple format.
for example.
2334312,543,MYNAME,NYC,20090302
here 2334312 is the key value which is unique. like so data file contains around 5 millions of data and index file contains index information for these 5 million data.
Note: Currently I am performing only read on this file and only one process is accessing it.