How to Change Virtual Memory Size on 视窗 10: 分步指南.
System-managed page files
默认情况下, page files are system-managed. This means that the page files increase and decrease based on many factors, such as the amount of physical memory installed, the process of accommodating the system commit charge, and the process of accommodating a system crash dump.
例如, when the system commits charge is more than 90 percent of the system commit limit, the page file is increased to back it. This continues to occur until the page file reaches three times the size of physical memory or 4 GB, whichever is larger. This all assumes that the logical disk that is hosting the page file is large enough to accommodate the growth.
The following table lists the minimum and maximum page file sizes of system-managed page files in 视窗 10.
Minimum page file size | Maximum page file size |
---|---|
Varies based on page file usage history, amount of RAM (RAM ÷ 8, max 32 GB) and crash dump settings. | 3 × RAM 或者 4 GB, whichever is larger. This is then limited to the volume size ÷ 8. 然而, it can grow to within 1 GB of free space on the volume if required for crash dump settings. |
How to increase virtual memory using Settings (图形用户界面)
To adjust the virtual memory size on 视窗 10, use these steps:
1. 打开 Settings;
2. 导航至 System\About;
3. Under the “Related settings” section, click the System info;
4. 单击 Advanced system settings option from the left pane;
5. 单击 Advanced 选项卡.
6. Under the “Performance” section, 点击 Settings;
7. 单击 Advanced 选项卡;
8. Under the “Virtual memory” section, click the 改变;
9. 清除 Automatically manage paging files size for all drives 选项.
10. Select the Custom size 选项.
11. Specify the initial and maximum size for the paging file in megabytes.
笔记: The size of the virtual memory is unique to each device, and it can’t be generalized. 然而, usually, it’s recommended to use a number that’s one and a half times the total available memory for the “Initial size” and three times of available memory for the “Maximum size” when possible.
12. 单击 放 按钮.
13. 单击 好的 按钮.
14. 单击 好的 button again.
15. Restart your device.
If you need to revert the changes, you can use the same instructions, but on 步 9, make sure to check the Automatically manage paging size for all drives 选项, and restart your device to apply changes.
How to increase virtual memory using Windows PowerShell
To modify the paging file size with Windows PowerShell:
1. 打开 开始.
2. 搜索 视窗 电源外壳, right-click the top result, and select the Run as administrator 选项.
笔记: Also you can right mouse button click on 开始 button and run 视窗 电源外壳 (行政)
3. Type the following command to get the current status of the paging file:
wmic pagefile list /format:list
4. Type the following command to switch from Automatic Manage 到 Custom virtual memory:
wmic computersystem where name="%computername%" set AutomaticManagedPagefile=false
5. Type the following command to set the initial and maximum size of the virtual memory:
wmic pagefileset where name="C:\\pagefile.sys" set InitialSize=<InitialSizeinMB>,MaximumSize=<MaximumSizeinMB>
An example (Initial – 1024 Mb, Maximum – 4096 Mb):
wmic pagefileset where name="C:\\pagefile.sys" set InitialSize=1024,MaximumSize=4096
6. Type the following command to restart your PC:
shutdown -r -t 00
After you complete the steps, the device will start using the new values for virtual memory, which, if done correctly, should help to improve system performance.
笔记: If you no longer need to use the custom size for virtual memory, you can always revert the changes to automatic:
wmic computersystem where name="%computername%" set AutomaticManagedPagefile=true
Restart your device.
笔记: It’s possible to disable virtual memory on 视窗 10, even when you have a large amount of system memory, it’s not recommended to disable this feature. Usually, if you disable it, some applications may stop working, some system features may not work efficiently, and you may end up with some weird behaviors.