Windows Pagefile Size with Large RAM and SSD

memorypagefilessdwindows

I just upgraded my Windows 7 machine from 12GB to 24GB RAM – both for running more VMs and for future proofing.

My C drive is an SSD with 129GB formatted size.

I was surprised to find out that the SSD only has 68GB free (most of my files are on D: to G:). Researching I found 24GB of my precious C: SSD are taken up by the virtual memory pagefile in the root.

Do I need such large amounts of virtual memory when I have 24GB or RAM? I bought this size of memory so I'd not have to go to disk.

Best Answer

I have 32GB of system RAM and a 256GB SSD, so I wondered the same thing. It does seems safe to change this, since even the dialog itself, at System Properties | Performance Options | Virtual Memory indicates:

Total paging file size for all drives

  • Minimum allowed: 16 mb
  • Recommended: 7,676 mb
  • Currently allocated: 32,768 MB

When defaulted to "system managed size", it was at the maximum of 32768 equivalent to memory size.

I changed it to the "recommended" value so it is now set to range between 7676 - 32768 instead of fixed at 32768:

Virtual Memory page file settings

I'll have to reboot and see if this helps. Edit: rebooted, confirmed, pagefile is now 7GB instead of 32GB. Success!

Since the "why have a paging file at all with that much memory" argument always comes up, it is advisable to have some page file, for the reasons that Mark Russinovich outlines:

Perhaps one of the most commonly asked questions related to virtual memory is, how big should I make the paging file? There’s no end of ridiculous advice out on the web and in the newsstand magazines that cover Windows, and even Microsoft has published misleading recommendations. ...

Some feel having no paging file results in better performance, but in general, having a paging file means Windows can write pages on the modified list ... out to the paging file, thus making that memory available for more useful purposes (processes or file cache). So while there may be some workloads that perform better with no paging file, in general having one will mean more usable memory being available to the system (never mind that Windows won’t be able to write kernel crash dumps without a paging file sized large enough to hold them).

That is why I advocate the recommended paging file size, or at least ½ the recommended size if you are absolutely, positively sure the peak commit charge (max real world memory usage) of the apps you typically use fits in the memory you have. Read the section titled How Big Should I Make the Paging File? in that article for more, it is the definitive statement on the matter. If you'd like to read even more, try this excellent Server Fault question.

Related Question