Re: MapViewOfFile v ReadFile experiments and results

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




> Tony Proctor wrote:

> I don't know the specific algorithm used by the file cache under Windows
> Mark. However, there would be a similar delay when ReadFile first accesses
> the file. Thereafter, these algorithms usually depend on available
> resources, system loading, the number of concurrent accessors to the file,
> the frequency of accesses to the same file, etc
>
> You may also find that the system caching is more tuned to the de-blocking
> necessary for record access via ReadFile
>
Yes, this makes sense. Interestingly, I still haven't found file
mapping to be any faster than ReadFile with sequential reads (and to
clarify an earlier post, when I say sequential reads, I don't only mean
reading chunk by chunk, I also mean using the FILE_FLAG_SEQUENTIAL_SCAN
flag which as I understand it increased the read ahead caching). Also,
I still suspect that I've hit the limit of the disk subsystem and that
I can probably only improve the speed of non-buffered reads (which is
what I'm mainly interested in) with multiple threads, though in
practice that may be overkill!

.



Relevant Pages