Virtual memory acts as an additional memory resource on your system if it runs out of RAM. For that, it uses some reserved disk space, which you’ll find as a hidden pagefile.sys file.
Since virtual memory uses up additional disk space automatically, it’s not necessary to manually limit its size unless you experience any system instabilities.
If however, you do run into some issues, check the total memory resources you need for your work. Then, specify the virtual memory (pagefile) sizes accordingly.
Let’s discuss everything in detail.
Recommended Virtual Memory Size
Having your system manage the virtual memory size for all drives is undoubtedly the best option.
You will experience very few issues. Just make sure to leave behind enough free space on your C drive.
If the drive doesn’t have much free space, your system will automatically use another drive for the paging file. You can also specify the next drive manually.
The only time where you may have to manually set the size is when you run into pagefile-related system issues. Even then, the amount of virtual memory you need depends on your system usage.
With larger RAMs (16+ GB), your system doesn’t need a lot of additional memory resources. But for systems with smaller ones, you’ll probably run out of memory soon.
It’s best to have a proportionally larger virtual memory in such cases.
RAM Size (GB) | Initial Pagefile Size (MB) | Maximum Pagefile Size (MB) |
4 GB | 2048 | 8192 |
8 GB | 4096 | 12288 |
16 GB | 2048 | 16384 |
32 GB | 1024 | 8192 |
My recommended pagefile sizes for different RAMs
For 64GB+ RAMs, the RAM itself should be enough for all purposes. So you can simply set 1-2 GB for pagefile to account for some rare circumstances.
Note: If you wish to enable complete memory dumps, a pagefile space of your RAM + 257 MB is necessary.
Determine the Ideal Virtual Memory Size Yourself
The above sizes are my recommendations. They have worked for me and a lot of others, but may not be ideal for you.
It’s best to estimate the ideal virtual memory size for your system by using Process Explorer, a Microsoft SysInternals tool.
For that,
- Make sure you have enough space on your system drive.
- Open Run (Windows key + R), type
systempropertiesadvanced
, and click OK. - Click Settings under Performance, go to the Advanced tab, and select Change.
- Make sure Automatically manage paging file size for all drives is enabled.
- Run all the apps you would normally use.
- Download Process Explorer from Microsoft Sysinternals. Extract it into your local drive.
- Run Process Explorer (
procexp64.exe
). - Click on the System Information icon on the top portion.
- Go to the Memory tab and check the Peak Commit Charge.
- Now, disable the automatic paging file size and manually set it as follows:
- Initial size: Peak Charge – RAM size (in MB)
- Maximum size: Twice the initial size
- In my system, the peak commit charge was about 20489960 KB = 20009 MB and my RAM size is 8000 MB (8 GB RAM is only about 7.8 GB in real, which is slightly less than 8000 MB).
So I set the Initial Size to 20000 – 8000 = 12000 MB, and the Maximum size to 24000 MB. - If the peak commit charge is less than the RAM’s capacity, set the Initial size to 2048 MB and the Maximum to double that amount.
Extra Tips
- If you are using an SSD and an HDD, create the pagefile on the SSD for better performance.
- If you are only using hard drives, create the pagefile on the OS partition. If you only play computer games, you can also use the game volume for this purpose.
Isn’t Higher Virtual Memory Better?
Virtual Memory is not an extension of the RAM but is meant to be a failsafe in case the RAM is not enough for the active processes. Without the virtual memory, your system will crash once it runs out of RAM.
The pagefile does not allow running apps from it and you can’t read/write data into it. Your system will simply use this space to transfer background activities on the RAM to the virtual memory.
This way, your RAM will have more space for active processes. Once the system needs to operate on those tasks, it will transfer other data to the virtual memory and retrieve the previous data to the RAM.
Your system will start using the virtual memory for a lot of background tasks to limit RAM usage. The OS will still use the virtual memory as a swap space even when the RAM is not fully used up.
So, a larger virtual memory may instead bring about the following problems:
What Happens if I Specify Less Virtual Memory Instead?
Your computer uses the pagefile both as additional memory resources and to store memory dumps.
A smaller virtual memory affects both of these features and causes the following issues:
Gracias por leer absolutoyrelativo.com. ¡Hasta la próxima!