Virtualization Manage Virtual Memory Paging File in Windows 11


  • Staff
Virtual_Memory_banner.png

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

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.
References:


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: 122
Last edited:
Please note, according the the official documentation the WMIC command line utility is deprecated. Here is an example PowerShell script (it needs to be run as an Administrator to work) that unchecks the Automatically manage paging file size for all drives checkbox at the top, removes the paging file for drive D: and sets the paging file for drive C: to system managed.
Powershell:
#untick the checkbox at the top
gwmi Win32_ComputerSystem -EnableAllPrivileges |%{$_.AutomaticManagedPagefile=$False;$_.Put()} |Out-Null
#remove pagefile for drive D:
(gwmi win32_pagefilesetting |?{$_.name="D:\pagefile.sys"}).Delete()
#set pagefile for drive C: to system managed
swmi -Class Win32_PageFileSetting -Arguments @{name="C:\pagefile.sys";InitialSize=0;MaximumSize=0} -EnableAllPrivileges |Out-Null

(Remember to restart the computer next for these changes to apply; also remember that any changes having been made to these settings from within Powershell in this manner will not be visible in Options One/Two/Three/Four of this tutorial until after the computer has been restarted.)

To view the current settings with Powershell:
Powershell:
Get-CimInstance Win32_PageFileUsage |fl *
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
Please note, according the the official documentation the WMIC command line utility is deprecated.

Luckily the WMIC still works since it's only deprecated and not removed.

 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1 14-eu0098nr (2024)
    CPU
    Intel Core Ultra 7 155H 4.8 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Graphics card(s)
    Integrated Intel Arc
    Sound Card
    Poly Studio
    Monitor(s) Displays
    14" 2.8K OLED multitouch
    Screen Resolution
    2880 x 1800
    Hard Drives
    2 TB PCIe NVMe M.2 SSD
    Internet Speed
    Intel Wi-Fi 7 BE200 (2x2) and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender and Malwarebytes Premium
Luckily the WMIC still works since it's only deprecated and not removed.

Yeah, but after 2 whole years of it having been deprecated, I was thinking maybe now would be an excellent time to throw in at least some info about that which supersedes it. lol
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
Yeah, but after 2 whole years of it having been deprecated, I was thinking maybe now would be an excellent time to throw in at least some info about that which supersedes it. lol

:shawn:
 

My Computers

System One System Two

  • OS
    Windows 11 Pro for Workstations
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom self build
    CPU
    Intel i7-8700K 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING (11GB GDDR5X)
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G75 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    Seasonic Prime Titanium 850W
    Case
    Thermaltake Core P3 wall mounted
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gbps Download and 35 Mbps Upload
    Browser
    Google Chrome
    Antivirus
    Microsoft Defender and Malwarebytes Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
  • Operating System
    Windows 11 Pro
    Computer type
    Laptop
    Manufacturer/Model
    HP Spectre x360 2in1 14-eu0098nr (2024)
    CPU
    Intel Core Ultra 7 155H 4.8 GHz
    Memory
    16 GB LPDDR5x-7467 MHz
    Graphics card(s)
    Integrated Intel Arc
    Sound Card
    Poly Studio
    Monitor(s) Displays
    14" 2.8K OLED multitouch
    Screen Resolution
    2880 x 1800
    Hard Drives
    2 TB PCIe NVMe M.2 SSD
    Internet Speed
    Intel Wi-Fi 7 BE200 (2x2) and Bluetooth 5.4
    Browser
    Chrome and Edge
    Antivirus
    Windows Defender and Malwarebytes Premium
Back
Top Bottom