Optimization - reading a file from disk using the Windows API

I use the Windows API to work with files. My work is very good. I read the file in chunks, but I do not know its optimal size. I know that it must be a multiple of the size of the disk cluster.

Is there a cache on the disk? IF I use a piece more than a cache, should my performance be worse? Am I right?

thank!

+3
source share
1 answer

Yes, Windows provides a cache level when working with files. See the official MS documentation . I'm not sure about the exact size of the cache and possible trade-offs, the probability that the size of the cache depends on the amount of available system memory and, possibly, other factors.

- API -. , . . .

+1

Source: https://habr.com/ru/post/1790114/


All Articles