Virtualization Manage Virtual Memory Paging File in Windows 11


  • Staff
Virtual_Memory_banner.png

A paging file (aka: "page file" and "virtual memory") enables the system to remove infrequently accessed modified data from physical memory to let the system use physical memory more efficiently for more frequently accessed data.

Windows also uses the page file to store data when physical memory (RAM) is full.

The system automatically manages the size of the paging file ("C:\pagefile.sys") on the Windows drive by default.

However, there may be times you may need to manually manage the paging file. For example:
  • If the C: drive that Windows is installed on is small in size, you may wish to remove the paging file from that drive, and add a paging file to another drive with more space instead.
  • If you use a lot of memory, then you may wish to add a paging file to another drive to have available if needed.
  • If you don't use a lot of memory and your paging file is large in size, you may wish to use a smaller custom size.
  • If you are getting a BSOD PAGE_FAULT_IN_NONPAGED_AREA or KERNEL_DATA_INPAGE_ERROR or Low Memory type error when the paging file size is not system managed, you may need to set a larger custom size for the paging file.
See also:

This tutorial will show you how to manage the virtual memory paging file for each drive on your Windows 10 and Windows 11 PC.


You must be signed in as an administrator to manage the paging file.



Contents

  • Option One: Set Paging File Size for All Drives to be Automatically Managed
  • Option Two: Add or Set Paging File Size for Specific Drive to be System Managed
  • Option Three: Add or Set Custom Paging File Size for Specific Drive
  • Option Four: Remove Paging File for Specific Drive
  • Option Five: Set Paging File Size for All Drives to be Automatically Managed using Command
  • Option Six: Set Custom Paging File Size for Specific Drive using Command




Option One

Set Paging File Size for All Drives to be Automatically Managed


This is the default setting.


1 Open System Properties (SystemPropertiesAdvanced.exe).

2 Click/tap on Settings under the Performance section. (see screenshot below)

System_Properties-1.png

3 Click/tap on the Advanced tab, and click/tap on Change under the Virtual memory section. (see screenshot below)

System_Properties-2.png

4 Check Automatically manage paging file size for all drives, and click/tap on OK. (see screenshot below)

This will be applied to each drive you have set a paging file for.


Automatically_manage_paging_file_size_for_all_drives.png

5 Click/tap on OK. (see screenshot below)

System_Properties-3.png

6 Click/tap on OK. (see screenshot below)

System_Properties-4.png

7 Click/tap on OK. (see screenshot below)

System_Properties-5.png

8 Click/tap on Restart Now when ready to restart the computer to apply. (see screenshot below)

System_Properties-6.png




Option Two

Add or Set Paging File Size for Specific Drive to be System Managed


This option is good when you only want the paging file size for specific drive(s) to be system managed instead of for all drives.


1 Open System Properties (SystemPropertiesAdvanced.exe).

2 Click/tap on Settings under the Performance section. (see screenshot below)

System_Properties-1.png

3 Click/tap on the Advanced tab, and click/tap on Change under the Virtual memory section. (see screenshot below)

System_Properties-2.png

4 Uncheck Automatically manage paging file size for all drives, and click/tap on OK. (see screenshot below step 8)

5 Select the drive (ex: "C") with a paging file or to add a paging file you want its size to be system managed. (see screenshot below step 8)

6 Select (dot) System managed size. (see screenshot below step 8)

7 Click/tap on the Set button. (see screenshot below step 8)

8 Click/tap on OK. (see screenshot below)

System_managed_size.png

9 Click/tap on OK. (see screenshot below)

System_Properties-3.png

10 Click/tap on OK. (see screenshot below)

System_Properties-4.png

11 Click/tap on OK. (see screenshot below)

System_Properties-5.png

12 Click/tap on Restart Now when ready to restart the computer to apply. (see screenshot below)

System_Properties-6.png




Option Three

Add or Set Custom Paging File Size for Specific Drive


1 Open System Properties (SystemPropertiesAdvanced.exe).

2 Click/tap on Settings under the Performance section. (see screenshot below)

System_Properties-1.png

3 Click/tap on the Advanced tab, and click/tap on Change under the Virtual memory section. (see screenshot below)

System_Properties-2.png

4 Uncheck Automatically manage paging file size for all drives, and click/tap on OK. (see screenshot below step 9)

5 Select the drive (ex: "C") with a paging file or to add a paging file you want to set a custom size for. (see screenshot below step 9)

6 Select (dot) Custom size. (see screenshot below step 9)

7 Enter the Initial size (minimal) you want in MB (1024 MB = 1 GB) for the paging file on the selected drive. (see screenshot below step 9)

8 Enter the Maximum size you want in MB (1024 MB = 1 GB) for the paging file on the selected drive. (see screenshot below step 9)

9 Click/tap on the Set button. (see screenshot below)

Custom_paging_file_size-1.png

10 If prompted, click/tap on Yes to confirm. (see screenshot below)

Custom_paging_file_size-2.png

11 Click/tap on OK. (see screenshot below)

Custom_paging_file_size-3.png

12 Click/tap on OK. (see screenshot below)

System_Properties-3.png

13 Click/tap on OK. (see screenshot below)

System_Properties-4.png

14 Click/tap on OK. (see screenshot below)

System_Properties-5.png

15 Click/tap on Restart Now when ready to restart the computer to apply. (see screenshot below)

System_Properties-6.png




Option Four

Remove Paging File for Specific Drive


1 Open System Properties (SystemPropertiesAdvanced.exe).

2 Click/tap on Settings under the Performance section. (see screenshot below)

System_Properties-1.png

3 Click/tap on the Advanced tab, and click/tap on Change under the Virtual memory section. (see screenshot below)

System_Properties-2.png

4 Uncheck Automatically manage paging file size for all drives, and click/tap on OK. (see screenshot below step 9)

5 Select the drive (ex: "C") with a paging file you want to remove. (see screenshot below step 9)

6 Select (dot) No paging file. (see screenshot below step 7)

7 Click/tap on the Set button. (see screenshot below)

No_paging_file-1.png

8 If prompted, click/tap on Yes to confirm. (see screenshot below)

Custom_paging_file_size-2.png

9 Click/tap on OK. (see screenshot below)

No_paging_file-2.png

10 Click/tap on OK. (see screenshot below)

System_Properties-3.png

11 Click/tap on OK. (see screenshot below)

System_Properties-4.png

12 Click/tap on OK. (see screenshot below)

System_Properties-5.png

13 Click/tap on Restart Now when ready to restart the computer to apply. (see screenshot below)

System_Properties-6.png




Option Five

Set Paging File Size for All Drives to be Automatically Managed using Command


This is the default setting.

This command does the same as Option One.


1 Open Windows Terminal (Admin), and select Command Prompt.

2 Copy and paste the command below into Windows Terminal (Admin), and press Enter. (see screenshot below)

wmic computersystem where name="%computername%" set AutomaticManagedPagefile=True

Automatically_manage_paging_file_size_for_all_drives_command.png

3 Close Windows Terminal (Admin).

4 Restart the computer to apply.




Option Six

Set Custom Paging File Size for Specific Drive using Command


This option does the same as Option Three.


1 Open Windows Terminal (Admin), and select Command Prompt.

2 Copy and paste the command below into Windows Terminal (Admin), and press Enter. (see screenshot below)

wmic computersystem where name="%computername%" set AutomaticManagedPagefile=False

Custom_paging_file_size_command-2.png

3 Copy and paste the command below into Windows Terminal (Admin), and press Enter. (see screenshot below step 4)

wmic pagefile list /format:list

4 Make note of the paging file Name (ex: "C:\pagefile.sys") you want to set a custom size for. (see screenshot below)

Custom_paging_file_size_command-1.png

5 Type the command below into Windows Terminal (Admin), and press Enter. (see screenshot below)

wmic pagefileset where name="<paging file name>" set InitialSize=<min size>,MaximumSize=<max size>

Substitute <paging file name> in the command above with the actual paging file Name (ex: "C:\pagefile.sys") from step 4.

Substitute <min size> with the actual initial size in MB you want for the paging file size.

Substitute <max size> with the actual maximum size in MB you want for the paging file size.

For example:
wmic pagefileset where name="C:\pagefile.sys" set InitialSize=800,MaximumSize=2924


Custom_paging_file_size_command-3.png

6 Close Windows Terminal (Admin).

7 Restart the computer to apply.


That's it,
Shawn Brink


 

Attachments

  • Virtual_Memory.png
    Virtual_Memory.png
    6.4 KB · Views: 15
Last edited:

Latest Support Threads

Top Bottom