How to adjust default virtual memory size on Windows 10?
This article will explain how to adjust the default virtual memory size on Windows 10.
What is virtual memory?
Virtual memory can be considered an extension of the computer's physical memory. In Windows 10, this file is named pagefil.sys (invisible to the user), and there's an easy way to adjust its default size or disable it.
How to change the default virtual memory size on Windows 10?
1) Click Start > File Explorer. Right-click on This PC, then left-click on Properties > Advanced System Settings > Advanced tab > Performance. Click Settings.
2) In the Performance Options window, go to the Virtual memory section, and click Change.
3) By default, the size of the paging file is managed by Windows. Because of this, the first step is to clear the Automatically manage paging file size for all drives checkbox:
Now that the options have been unlocked, you can move onto the next step.
How to move the paging file to another partition?
If you're running out of space on your primary partition, then you can move it to another one (same drive).
How to disable the Paging file?
Select the primary partition for the list, choose No Paging file, and click Set.
How to enable the Paging File?
Now that the paging file has been disabled on the first partition, select the one that you want to use, and pick either System managed size or Custom size.
System managed size allows Windows to dynamically manage the size of the paging file.
Custom size allows you to set the size of the file. Choosing a custom size is tricky — the idea is to limit the Maximum size so that the paging file does not become too big, although it will be limited by the size of the partition size:
As a general rule, the maximum size of the paging file must be 1.5x the amount of RAM installed. So, for a PC running on 4 GB of RAM, the maximum size of the swap file will be 1024 x 4 x 1.5 Mb.
What are other recommendations?
- When to disable the paging file? Unless you want to use Windows' hibernation feature, you can safely disable the paging file for PCs equipped with 8 GB of RAM (and more).
- Virtual memory and SSD? You must turn off the paging file on an SSD. The constant writing/deleting of files will definitely have a negative impact on your SSD's lifespan.
- A paging file for each partition? If you are using a single drive with multiple partitions, enabling a different paging file on each of them won't necessarily speed up the swapping of files. It will simply increase the time that Windows requires to search for the swap files (stored in multiple locations).