473,396 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

File Block Prefetching

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

Feb 3 '07 #1
1 2896
gullu wrote:
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);
}
}

??

Feb 3 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Amir | last post by:
When prefetching images, why do I need the "if (document.images)" statement? if (document.images) { pic1on= new Image(300,300); pic1on.src="pic1.gif"; pic2on= new Image();...
79
by: pinkfloydhomer | last post by:
I want to scan a file byte for byte for occurences of the the four byte pattern 0x00000100. I've tried with this: # start import sys numChars = 0 startCode = 0 count = 0
10
by: Sean C. | last post by:
Helpful folks, I ran across a statement I found rather confusing in the IBM-published Advanced DBA Certification Guide and Reference for UDB V8. On page 107 the author is explaining why the a...
17
by: Arnold | last post by:
Is using fseek and ftell a reliable method of getting the file size on a binary file? I thought I remember reading somewhere it wasn't... If not what would be the "right" and portable method to...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
3
by: Rosario Morgan | last post by:
Hello Help is great appreciated in advance. I need to loop through a file 6000 bytes at a time. I was going to use the following but do not know how to advance through the file 6000 bytes at...
3
by: windstorm | last post by:
int main( void ) { int fd,size,position; char buf; char lkl = "hello,world!"; fd = creat( "test",0644 ); size = write( fd,lkl,sizeof(lkl) ); close(fd); fd = open( "test",O_RDWR ); size =...
8
ashitpro
by: ashitpro | last post by:
Understanding Ext-2 file system:chapter 1 The first block in each Ext2 partition is never managed by the Ext2 filesystem, because it is reserved for the partition boot sector. The rest of the...
5
by: harish2rock | last post by:
Hi..Me just a beginner in c++ programming. I have come acroos a program which is as follows : I have to prepare a file which contains the information in block format. as an example, the file...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.