0
I would like to have some control over which programs occupy RAM and which occupy the page file when RAM becomes limited. Perhaps some sort of prioritisation-based solution would work well.
I am unable to add more RAM or upgrade the device, and I desire to run a virtual machine on it despite it already being fairly RAM starved. The VM will mostly be operating unattended, so snappy performance is not a priority, and I would be happy for it to occupy page file space so that my precious RAM can be used on everything else.
I'm aware that Windows attempts to "intelligently" decide what should occupy RAM and what should be offloaded to the page file, but it's not intelligent enough and things begin to slow down, so some manual control here would be very beneficial.
All the questions/posts I've found relating to this topic wish to achieve the opposite of what I'm requesting (i.e. prevent the page file from being used).
Program data goes into the swap file (it's actually a page file). Executable code already exists on disk as an exe file. So Windows will dump executable code from memory knowing it can reread it from the exe file. If there is no memory pressure executable code will be in memory. You can give recommendations to Windows see https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setprocessworkingsetsize. Even if it not in main memory it will be in the file cache. Memory can be in program memory and the file cache and it only uses the memory it uses.
– Mark – 2020-01-23T05:56:26.503@Mark that sounds like the beginnings of a great answer... – Mokubai – 2020-01-23T07:53:30.763
The subject is so large. – Mark – 2020-01-23T07:57:17.093