Tuning windows virtual memory/paging for a specific workload

Solution 1:

When the program ends, the programs are not paged back again. Even if I wait hours, they do not get brought back.

Windows does not page memory back in for your other processes back in until those pages are actually used by them. There are no parameters (that I know of) that will cause pages to be paged back in until those pages are actually referenced.

If it did do that, it would frequently waste time and RAM paging in stuff you don't end up using. Supposed you have five processes mostly paged out. Which one should it bring back? Take a guess? A little bit of all of them? Or wait until you start using one and then make as much RAM available for that one as possible?

To me this appears that Windows is using RAM for disk cache to keep my large 1.5GB file just incase I want to re-read it (which I don't), rather than fetching back my normal processes.

Windows, especially newer versions, does aggressively use excess RAM to cache "hot" files, but this never comes at the expense of programs that need RAM. These pages are quickly sacrificed to other processes that need memory. It's fast, because disk cache pages don't need to be paged out to the page file. They are just remapped into the address space of the process that needs it.

(And I sincerely doubt that a 1.5GB file that's opened once makes it to "hot" file status.)

That means when I show up and try to use my computer it's painfully slow for ages while it slowly pages each process back in as I use it.

It sounds to me like everything is working normally, but that you could stand to add more RAM or perhaps upgrade to a faster drive.

If you still think something is fishy, please post more specific information, like which version of Windows you're using, how much RAM the machine has, etc.