How to Set Paging File Size in Windows 10 and 11
In this article
You can manually configure the virtual memory (paging file) size in Windows 10 and 11 to prevent application crashes, reduce "Out of Memory" errors, or optimize system performance for heavy workloads. This is achieved by adjusting advanced system settings that control how your hard drive supplements your physical RAM.
What You'll Need
- A Windows 10 or Windows 11 PC with administrator privileges.
- Sufficient free space on your primary hard drive or SSD (at least equal to the amount you plan to allocate).
- Your current amount of installed physical RAM (check via Settings > System > About).
Step-by-Step
- Open Advanced System Settings: Click the Start button and type Advanced system settings. Select View advanced system settings from the search results. Alternatively, press Win + R, type
sysdm.cpl, and hit Enter. - Navigate to Performance Options: In the System Properties window that opens, click the Advanced tab at the top. Under the Performance section, click the Settings... button.
- Access Virtual Memory Settings: A new Performance Options window will appear. Click the Advanced tab again. At the bottom, under the Virtual memory section, click the Change... button.
- Disable Automatic Management: By default, Windows manages this automatically. Uncheck the box that says Automatically manage paging file size for all drives. If you do not uncheck this, the subsequent steps will be grayed out.
- Select Your Drive: In the list labeled Drive [Volume Label], select the drive where Windows is installed (usually C:). Note that labels may differ slightly by version or device configuration.
- Choose Custom Size: Select the Custom size radio button. You will see two boxes: Initial size (MB) and Maximum size (MB).
- Enter Values: Enter your desired values in megabytes (MB). For example, if you have 16 GB of RAM (approx. 16,384 MB), a common recommendation is to set the Initial size to 16,384 and the Maximum size to 24,576 (1.5x RAM). Ensure the units are in MB, not GB.
- Apply Changes: Click the Set button. This is a critical step; without clicking Set, your changes will not be saved. Then click OK in the Virtual Memory window.
- Restart Your Computer: Click OK in the Performance Options window, and OK in the System Properties window. You must restart your PC for the changes to take effect.
Common Mistakes
The most frequent error users make is forgetting to click the Set button after entering custom values. Many users enter the numbers, click OK immediately, and wonder why nothing changed. Always click Set before closing the dialog.
Another mistake is setting the maximum size too small. If your applications require more memory than the paging file allows, Windows will throw an out-of-memory error. Conversely, setting it excessively large (e.g., 100 GB on a small SSD) wastes valuable storage space without providing performance benefits.
Users also often confuse GB and MB. The input fields require Megabytes. Entering 16 instead of 16,384 for 16 GB of RAM will result in a tiny 16 MB paging file, which is insufficient for modern systems.
Tips
Use an SSD: If possible, place the paging file on a Solid State Drive (SSD) rather than a traditional Hard Disk Drive (HDD). SSDs have much faster read/write speeds, reducing the performance penalty associated with swapping data to disk.
Keep it on One Drive: Do not spread the paging file across multiple drives unless you have specific enterprise requirements. Keeping it on the primary drive ensures consistent performance and simplifies troubleshooting.
Monitor Usage: Use Task Manager (Ctrl+Shift+Esc) > Performance > Memory to monitor how much physical memory you are using. If you consistently hit 90-100% usage, increasing the paging file or adding more physical RAM is necessary.
Troubleshooting
If your computer fails to boot after changing these settings, or if you experience blue screens, restart your PC and enter Safe Mode. Return to the Virtual Memory settings and re-check Automatically manage paging file size for all drives. This resets Windows to its default safe configuration.
If you receive an error stating there is not enough disk space, you must free up space on your drive or reduce the maximum size value. Ensure you have at least 1-2 GB of free space remaining on the drive after applying the new paging file size.
If applications still crash despite adequate paging file sizes, the issue may be with the application itself or physical RAM failure. Run the Windows Memory Diagnostic tool (search for it in the Start menu) to check for hardware faults.
Frequently Asked Questions
Should I set the paging file to exactly my RAM size?
It is generally recommended to set the initial size equal to your RAM and the maximum size to 1.5 times your RAM. However, Windows 10 and 11 handle memory management well automatically for most users. Manual adjustment is usually only needed for specific professional software or large datasets.
Does a larger paging file improve gaming performance?
Not necessarily. If your game runs out of RAM, a larger paging file prevents crashes but may cause stuttering due to slower disk access speeds compared to RAM. Adding more physical RAM is a better solution for gaming performance than increasing the paging file.
Can I delete the paging file entirely?
No. While you can disable it, doing so is strongly discouraged. Many applications and the Windows kernel itself rely on virtual memory. Disabling it can lead to immediate system instability, application crashes, and inability to run certain programs.
Is it safe to change these settings?
Yes, it is safe. These settings are standard system configurations. As long as you ensure you have enough free disk space and do not set values that exceed your drive's capacity, there is no risk of damaging your hardware or operating system.
Why does my paging file size keep changing?
If you left the Automatically manage paging file size box checked, Windows will dynamically adjust the size based on current load. To lock the size, you must uncheck this box and manually set the Initial and Maximum sizes to the same value.
Where is the paging file located?
By default, it is located at C:\pagefile.sys. It is a hidden system file. You cannot delete or move it while Windows is running. You must disable it first, restart, delete the file, then re-enable it if desired.