While writing documents, playing games, or rendering videos, a pop-up suddenly appears saying virtual memory is insufficient, programs freeze, or even crash. This is a scenario many people have encountered. Most people's first reaction is to immediately increase virtual memory or suspect that the RAM stick is faulty. But the pop-up does not necessarily mean virtual memory is truly insufficient. It may also be due to tight physical memory, insufficient disk space on the drive where the page file is located, or a memory leak in some program.
Virtual memory is a portion of memory simulated by Windows using hard disk space, officially called the page file. Together with physical memory, it forms the system's commit limit. Only by first checking the current total virtual memory, committed size, and actual usage can you determine whether to adjust virtual memory, add physical memory, or clean up background programs.
The following explains in the order of symptoms, checking, judging, adjusting, and preventing. The operations are mainly for Windows 10/11. For other versions, refer to the system version you are actually using.
1. Common Symptoms of Insufficient Virtual Memory and Misjudgments
Common symptoms include: the system pops up a message saying "Your computer is low on memory" or "Virtual memory is insufficient"; programs stop responding, games crash, browsers crash; saving large files or opening large project files fails. These symptoms may be caused by insufficient physical memory, too small a page file, insufficient space on the drive where the page file is located, automatic system management but a full disk, or a program memory leak.
Many people directly look at memory usage in Task Manager and think virtual memory is insufficient when they see 90%. This judgment is not accurate. High physical memory usage means physical memory is tight; whether virtual memory is insufficient mainly depends on whether "Committed" is close to the commit limit, and whether the current and peak page file usage are close to the allocated size.
If only physical memory usage is high, but committed is far below the limit, prioritize closing background programs or adding physical memory. If page file usage stays close to the allocated value for a long time, then consider adjusting virtual memory.
2. Check Whether Current Virtual Memory Is Actually Insufficient
Method 1: Check Committed Size in Task Manager
- Press
Ctrl + Shift + Escto open Task Manager. - Switch to the "Performance" tab and click "Memory" on the left.
- Check "Committed" at the bottom, for example
12.3/20.0 GB. The number before the slash is the current committed amount, and the number after the slash is the commit limit. - If the value before the slash is often close to the value after the slash, and the system frequently pops up warnings, virtual memory may indeed be insufficient.
- Then check "In use (Compressed)". If physical memory usage is very high, but committed is far below the limit, prioritize adding memory or reducing multiple open programs.
Method 2: Check the Page File in Resource Monitor
- Press
Win + R, typeresmon, and press Enter. - Switch to the "Memory" tab.
- Check committed, limit, and peak in the "Commit" area.
- If the peak is close to the limit for a long time, or page file usage is close to the allocated size, further adjustment is needed.
Method 3: Check via Command Line
In Windows Command Prompt, you can run:
systeminfo | findstr /C:"Virtual Memory" /C:"Physical Memory"
wmic pagefile list /format:list
If the system says wmic is unavailable, use PowerShell instead:
Get-CimInstance Win32_PageFileUsage | Select-Object Name, AllocatedBaseSize, CurrentUsage, PeakUsage
Get-CimInstance Win32_OperatingSystem | Select-Object TotalVirtualMemorySize, FreeVirtualMemory, TotalVisibleMemorySize, FreePhysicalMemory
These values are usually in KB. AllocatedBaseSize is the page file allocation size, CurrentUsage is the current usage, and PeakUsage is the peak. If the peak is often close to the allocated size, the page file is too small. Also pay attention when FreeVirtualMemory is very low.
3. How to Determine Whether to Adjust Virtual Memory
You can start from the following situations when judging:
- The committed peak is close to the commit limit, and warnings pop up frequently: you can adjust virtual memory and also consider adding physical memory.
- Current or peak page file usage is close to the allocated size: the page file may be too small and can be appropriately increased.
- Physical memory usage is high, but committed is far below the limit: adjusting virtual memory alone has limited effect; adding physical memory is more direct.
- The drive where the page file is located has insufficient free space: first clean up the disk, or move the page file to an SSD with sufficient space.
- The system manages it automatically and disk space is sufficient: usually no manual modification is needed. For large software, virtual machines, video rendering, and similar scenarios, you can set it larger manually.
For specific operations, see How to set virtual memory on a computer?. As for how much to set, see What is a suitable virtual memory setting?. Do not blindly copy a fixed value; decide based on physical memory size, commonly used software, and remaining disk space.
4. Specific Steps and Precautions for Adjusting Virtual Memory
- Press
Win + R, typesysdm.cpl, and press Enter. - Go to the "Advanced" tab and click "Settings" in the "Performance" area.
- In Performance Options, switch to "Advanced" and click "Change" in the "Virtual memory" area.
- Uncheck "Automatically manage paging file size for all drives".
- Select an SSD with sufficient free space, usually the system drive. Select "Custom size".
- Enter "Initial size" and "Maximum size". For ordinary 16GB memory, you can first try an initial size of 16384 MB and a maximum of 32768 MB; for 8GB memory, you can try an initial size of 8192-12288 MB and a maximum of 16384-24576 MB; for 32GB and above, you can let the system manage it, or set it as needed.
- Click "Set", then "OK", and restart the computer as prompted.
Precautions: Back up important data before the operation, and it is recommended to create a system restore point. Do not disable the page file, as some programs depend on it to run. Do not place the page file on a drive with insufficient free space. Modern SSDs do not need excessive worry about lifespan, but frequent large writes are not recommended. If blue screens or instability occur after adjustment, you can restart into Safe Mode and change back to "Automatically manage paging file size for all drives".
5. Daily Habits to Prevent Insufficient Virtual Memory
Regularly check the committed peak in Task Manager, and handle it promptly when it approaches the limit. Close unnecessary startup items: switch to the "Startup" tab in Task Manager and disable programs that do not need to start automatically at boot. Reduce running large software simultaneously, do not keep a large number of browser tabs open for a long time, and exit virtual machines and rendering software promptly after use.
Keep at least 15%-20% free space on the system drive, and regularly clean up temporary files and useless installation packages. Update system patches and hardware drivers to reduce memory leak issues. If you often encounter insufficient virtual memory, adding physical memory is usually more effective than repeatedly increasing the page file.
Insufficient virtual memory is not scary. The key is to first check the current total virtual memory, actual usage, and peak, and then determine whether adjustment is needed. In daily use, doing a good job of disk cleanup, startup item management, and memory monitoring can reduce most pop-ups and lag issues.