File Block Prefetching

G

gullu

Hi,

File system implemented in LINUX/UNIX has the capability to prefetch
blocks of files from disk that can help a lot in speeding up
sequential speed up. The prefetcher does not always prefetch a block
and in steady state a sequential access can result in a file cache
miss as the prefetcher did not prefetch a block into the file cache.
In steady state after around 15 file blocks there is a file cache
miss.

Is there a construct or API provided in C/C++ that can force the file
system prefetcher to prefetch data from the disk?

Thanks,
gullu
 
T

Thorsten Kiefer

gullu said:
Hi,

File system implemented in LINUX/UNIX has the capability to prefetch
blocks of files from disk that can help a lot in speeding up
sequential speed up. The prefetcher does not always prefetch a block
and in steady state a sequential access can result in a file cache
miss as the prefetcher did not prefetch a block into the file cache.
In steady state after around 15 file blocks there is a file cache
miss.

Is there a construct or API provided in C/C++ that can force the file
system prefetcher to prefetch data from the disk?

Thanks,
gullu

How about this :
for(int i = 0;i < 123442512;++i) {
do_something_with(read(fd));
if(i % 1024 == 0){
seek(fd,i+1024);
read(fd);
seek(i);
}
}

??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top