How can I keep a file in Windows 7's cache?

Posted by netvope on Super User See other posts from Super User or by netvope
Published on 2010-04-17T03:23:58Z Indexed on 2010/04/17 3:33 UTC
Read the original article Hit count: 350

Filed under:
|
|
|
|

Sometimes you know better than Windows what files will be re-used later. Suppose you have 8GB of memory, and you use the same 1GB file every hour in an I/O-bound application (which takes 1 second to finish if the file is cached, and 1 minute if not.) Now you process some other 16GB of data that are not going to be re-used. Naturally the frequently used 1GB file will be pushed out of the cache. It would be beneficial if one can tell Windows to keep that 1GB file in memory. (Better yet, it would be great if I can tell Windows not to cache those 16GB of data, but I'm not optimistic that this can be done.)

The poor-man's way to keep a file in the cache would be to keep reading the file. Are there any better ways? Are you aware of any programs that do this?

(If this can be easily done under Linux, please let me know too.)

© Super User or respective owner

Related posts about disk

Related posts about cache