How to change virtual memory size on Windows 10

Windows 10 Virtual Memory

On Windows 10, virtual memory (or swap file) is an essential component (hidden file) designed to delete and temporarily store less frequently modified pages allocated in RAM (random access memory) to the hard drive. This approach allows the system to prioritize faster physical memory for more frequent processes and applications, improving overall performance and preventing the device from freezing in the event of a lack of system memory.

In addition, the swap file is important to support crash dumps during a system crash (blue screen of death), because without a sufficiently large swap file, a dump with all the contents of the system memory will not be created.

Although the system manages the page file size very well based on various factors automatically, it may sometimes be necessary to manually increase the default virtual memory values. For example, when you see the message “Your system is running out of virtual memory”. You notice a decrease in performance over time or a particular application requires specific parameters to function as expected.

If you’re having problems with virtual memory, the device doesn’t have enough memory, or you’re trying to improve system performance, Windows 10 lets you increase the size of virtual memory by at least two ways using the application and command prompt parameters.

In this Windows 10 guide, we’ll walk you through the steps to increase the size of virtual memory to improve system responsiveness.

How to increase virtual memory using Settings

Warning: Although anyone can change the paging file size, it’s only recommended to use these instructions if you have a valid reason, and you know what you’re doing.

To adjust the virtual memory size on Windows 10, use these steps:

  1. Open Settings.
  2. Click on System.
  3. Click on About.
  4. Under the “Related settings” section, click the System info option.
Windows 10 About 1
Windows 10 About 1
  1. Click the “Advanced system settings” option from the left pane.
  2. Click the Advanced tab.
  3. Under the “Performance” section, click the Settings button.
Windows 10 System Properties Advanced
  1. Click the Advanced tab.
  2. Under the “Virtual memory” section, click the Change button.
  3. Clear the Automatically manage paging files size for all drives option.
  4. Select the Custom size option.
  5. Specify the initial and maximum size for the paging file in megabytes.

Quick tip: The size of the virtual memory is unique to each device, and it can’t be generalized. However, usually, it’s recommended to use a number that’s one and a half times the total available memory for the “Initial size” and three times of available memory for the “Maximum size” when possible.

Windows 10 Virtual Memory

  1. Click the Set button.
  2. Click the OK button.
  3. Click the OK button again.
  4. Restart your device.

Once you complete the steps, you should notice an increase in performance when navigating Windows 10 as well as when running multiple apps at the same time.

If you need to revert the changes, you can use the same instructions, but on step No. 10, make sure to check the Automatically manage paging size for all drives option, and restart your device.

How to increase virtual memory using Command Prompt

To modify the paging file size with Command Prompt, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to understand the current status of the paging file and press Enter:wmic pagefile list /format:list
Check Virtual Memory Cmd Windows 10
Check Virtual Memory Cmd Windows 10
  1. Type the following command to switch form manage to custom virtual memory and press Enter:wmic computersystem where name="%computername%" set AutomaticManagedPagefile=false
Disable Managed Virtual Memory Windows 10
Disable Managed Virtual Memory Windows 10
  1. Type the following command to set the initial and maximum size of the virtual memory and press Enter:wmic pagefileset where name="C:\\pagefile.sys" set InitialSize=YOUR-INIT-SIZE,MaximumSize=YOUR-MAX-SIZEThis example sets the paging file to “9216” and “12288” megabytes for the initial and maxium size:wmic pagefileset where name="C:\\pagefile.sys" set InitialSize=9216,MaximumSize=12288
Increase Virtual Memory Cmd Windows 10
Increase Virtual Memory Cmd Windows 10
  1. Type the following command to restart your computer and press Enter:shutdown -r -t 00

If you no longer need to use the custom size for virtual memory, you can always revert the changes and allow Windows 10 to manage this feature using this command: wmic computersystem where name="%computername%" set AutomaticManagedPagefile=true and restarting your device.

After you complete the steps, the device will start using the new values for virtual memory, which, if done correctly, should help to improve system performance.

While it is recommended that you use one and a half times the memory available for the initial memory and three times the memory for the maximum size, be sure to test the changes and adjust the values if you experience freezes, crashes, and other problems.

Although it is possible to disable virtual memory on Windows 10, even when you have a large amount of system memory, it is not recommended to disable this feature. Usually, if you disable the swap file, some applications may stop working, some system features may not work effectively, and you may end up with strange behaviors.

Leave a Reply