Disable the superfetch (Prefetch/Sysmain) in Windows Server to free up system ram.

The superfetch (previously known as prefetch) in Windows Server 2019 is a function that runs in the background, constantly analysing your software use activity and analysing how that uses your ram and then it builds up a bit by bit picture of your most frequently accessed programs and file and typical resident memory pattern and keeps them in the superfetch which then lives in your system ram.

The problem with this is that it is not particularly intelligent and is not particularly configurable, so if you often open a large 1GB file even if you have limited system ram, the chances are the operating system will think it is doing you a favour holding that in the superfetch cache or if your server only performs one primary function. Still, on occasion, you do log in and open chrome and notepad because as a percentage, they are the most frequently used programs despite the fact that might only be once per week, it will take up valuable system ram to hold them in the superfetch cache to give you that few seconds speed improvement next time you open them.

On a busy system with regular use, especially a multi-user server, it is probably best to leave it in place as it will speed up the end-user experience when interacting with the server desktop and installed programs; however, in most cases for a server that is not how it is used.

To disable the super fetch function, you need to right-click on the start menu, click Computer Management, expand ‘Services and Applications’ on the left, and select ‘Services’ then, in the list of Services in the centre of the window, scroll down to find ‘SysMain’ right-click on properties and change the startup type to disabled, then click the ‘Stop’ Button.

It is best to reboot your server if appropriate, as this is the best way to flush the cache.