Creating a 1TB pagefile is an extremely large allocation and generally not necessary for most systems. A pagefile that large might indicate an underlying memory issue or a very specific workload. Ensure you have at least 1TB of free space on drive L: before attempting this.
Important Considerations Before You Start:
- Administrator Privileges: You must run Command Prompt (CMD) as an Administrator.
- Disk Space: Ensure Drive L: has at least 1TB (1024 GB) of free space available.
- Performance: Placing a very large pagefile on a slow drive (e.g., an HDD instead of an SSD) can severely impact system performance.
- Restart Required: Pagefile changes typically require a system restart to take full effect.
- Calculate Size in MB: 1 TB = 1024 GB = 1024 * 1024 MB = 1,048,576 MB. We will use this number for the
InitialSize and MaximumSize.
Here's how to create the 1TB pagefile on drive L: using CMD:
Steps to Create 1TB Pagefile on Drive L:
-
Open Command Prompt as Administrator:
- Search for
cmd in the Windows Start Menu.
- Right-click on "Command Prompt" and select "Run as administrator".
- Click "Yes" if prompted by User Account Control.
-
Disable System Managed Pagefile (Crucial!):
If the system automatically manages pagefile size, your manual settings will be ignored. You need to disable this first.
wmic computersystem where name="%computername%" set AutomaticManagedPagefile=FALSE
- You should see
Property(s) update successful.
-
Create/Set the 1TB Pagefile on L:
Now, use wmic to set the pagefile size for L:\pagefile.sys. We'll set both initial and maximum size to 1,048,576 MB to ensure a fixed-size, 1TB pagefile, which can offer better performance by preventing fragmentation.
wmic path Win32_PageFileSetting CREATE Name="L:\\pagefile.sys", InitialSize=1048576, MaximumSize=1048576
- Explanation:
wmic path Win32_PageFileSetting: Specifies the WMI class for pagefile settings.
CREATE: This method is used to create a new pagefile entry. If L:\pagefile.sys already had an entry, this command would update it.
Name="L:\\pagefile.sys": The full path to the pagefile. Note the double backslashes which are required for paths in WMI.
InitialSize=1048576: The initial size in MB (1TB).
MaximumSize=1048576: The maximum size in MB (1TB).
- You should see
Method execution successful.
-
Restart Your Computer:
For the changes to take effect, you must restart your system. You can do this via the Start Menu or using a CMD command:
shutdown /r /t 0
Verify the Pagefile Settings (After Restart)
After your computer restarts, you can verify the settings in a couple of ways:
1. Graphical User Interface (GUI):
- Right-click on "This PC" (or "My Computer") and select "Properties".
- Click on "Advanced system settings" on the left pane.
- In the "System Properties" window, go to the "Advanced" tab.
- Under "Performance", click the "Settings..." button.
- In the "Performance Options" window, go to the "Advanced" tab.
- Under "Virtual memory", click the "Change..." button.
- You should now see that "Automatically manage paging file size for all drives" is unchecked, and drive L: has "Custom size" with "Initial size (MB): 1048576" and "Maximum size (MB): 1048576".
2. Command Prompt (CMD):
Open a new Command Prompt (no admin needed for just viewing):
wmic path Win32_PageFileSetting get Name, InitialSize, MaximumSize /format:list
This command will list all pagefile settings. Look for the entry corresponding to L:\pagefile.sys and check its InitialSize and MaximumSize.
How to Revert/Undo (Optional)
If you need to revert to system-managed pagefiles or remove the L: pagefile:
-
Open CMD as Administrator.
-
Delete the L: Pagefile Entry:
wmic path Win32_PageFileSetting WHERE Name="L:\\pagefile.sys" DELETE
-
Enable System Managed Pagefile (Optional, if desired):
wmic computersystem where name="%computername%" set AutomaticManagedPagefile=TRUE
-
Restart Your Computer:
shutdown /r /t 0
Remember to be cautious with such large system changes.