What is virtual memory?
How to set it?
Read this post to get answers.

Virtual memory is amemory management techniquethat is implemented by using both hardware and software.
It makes the program think it has a contiguous and available storage space or address space.
After that, you could adjust the virtual memory to fix this problem.

Recommend: Want to know more information about operating system stuck in Windows Logo?
Thus, the more programs memory holds, the less free space memory has.
Therefore, Windows operating systems like adopting the virtual memory technology to increase computers memory capability.

This technology will leave a part of hard disk space to act as memory.
If the system is low on memory, the virtual memory will play its full part.
Virtual memory combines your computers RAM with temporary space on your hard disk.

Moving data to paging file can free up the RAM so your gear can complete its work.
In general, the more RAM your rig has, the faster the programs run.
However, your gear can read data from RAM much more quickly than from a hard disk.

So increasing the capacity of RAM is a better solution.
Virtual memory is, in fact, a giant file calledPageFile.Sys, which is invisible in most cases.
Therefore, virtual memory sometimes is also known as page file.

Recommend: You should not delete the Page Files.
Thus, Windows would like to use virtual memory to improve computers memory.
Virtual memory exists in the PAGEFILE.SYS file.
Reasonable Setting
How to verify the size of virtual memory?
1: Open File Explorer, right click This PC, and select Properties.
2: Select Advanced system parameters in the pop-up window.
3: In the System Properties window, click Advanced tab, and then click parameters under Performance.
4: In the Performance Options window, click Advanced tab, and then click Change under Virtual memory.
Here, the recommended size is equivalent to 1.5 -3 times the amount of RAM on your system.
We had better set it according to actual needs.
4: Check Performance counter under Create data logs section and click Next.
5: Click Add button to add counters.
In the upper left box, find and expand Paging File.
Then, click OK button.
6: like change Sample interval to a proper number, according to your need.
Then, click Next.
7: Choose where you like the data to be saved.
Then, click Next.
8: ensure that Save and close option is checked and then click Finish.
Right-hit it and choose Start.
11: At this time, right-tap on the paging file data collector set and choose Stop.
Then, go to Reports > User Defined > paging file.
Under paging file, there is a report about virtual memory usage.
Click this report to view it.
Therefore, the maximum size of the paging file is set to 512MB to save free space.
The hard disk may containdisk fragmentationsince its files are written in a non-sequential way.
Some people think that there will be disk fragments if Windows frequently read the pagefile.sys file.
Actually, its not.
Once pagefile.sys is created, its distribution key in in the partition will be fixed.
Reading and writing file will not influence the size of pagefile.sys file.
Thus, the larger free space the C drive has, the faster the system runs.
Virtual memory will change dynamically as you use the C drive.
Therefore, the C drive is easy to generate disk fragmentation to affect system operation speed.
So well, you had better set another volume like D: as the virtual memory.
Steps to Check the Location of Virtual Memory
Here, we take Windows XP for example.
Right-click My Computer icon and choose Properties from the bottom.
In the Performance Options box, grab the Advanced tab, and click Change button under Virtual memory.
After that, you could see the Virtual Memory dialog box.
And the specific values depend on your physical memory size.
And it is 1.5 times to 3 times the size of physical memory.
If your memory size is over 2GB, you need no virtual memory.
But, in some special situations, you also need the virtual memory.
After that, grab the D drive, and click Customer Size.
And then, punch in 512 in the following Initial Size and Maximize size box and click Set button.
Finally, click OK button.
Now, the system will be restarted to make this change take effect.
1: Right-click My Computer icon and choose Properties from the bottom.
Next, click Set and OK. After that, restart the computer.
After restarting, all work has been done.
If the system volume C doesnt have enough free space, you could store it on another partition.
However, how to complete this task?
Firstly, you should bring up the System.ini file (under the C: Windows) via the Notepad.
Then, in the [386Enh] section, change the location of Win386.swp file.
For instance, you might change Paging Drive= C: WindowsWin386.swp to Paging Drive= D: WindowsWin386.swp.
Windows 2000/XP users can click Control Panel-System-Advanced-performance, and then click tweaks-Advanced-Change to kick off the virtual memory dialog-box.
(By default, thesystem partitioncontains paging file.)
Windows XP requires 256 MB physical memory at least.
And you’ve got the option to disable it.
Steps: click Start and choose Run, and then pop in Regedit.
Next, choose HKEY-LOCAL-MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager\MemoryManagement.
Now, opt for Disable Paging Executive and punch in 1 in its value data.
If your RAM is larger than 4GB, virtual memory will make very little impact.
Clear Page File
At the same place, you might see a ClearPageFileAtShutdown choice.
Here, the Clear refers to clean and arrange the pagefile.sys file instead of completely removing it.
Microsoft notes that this is a safe option and it will not influence the performance.
When a process is running, Windows will automatically adjust working set.
3: Right-tap the Properties and click Enabled and click OK.
If there is no local group policy editor, you’re able to try another approach.
As follows:
2:ChooseHKEY-LOCAL-MACHINE\SYSTEM\CurrentControlSet\Control\SessionManager\MemoryManagement.
And then, double poke the ClearPageFileAtShutdown.
4: Restart the computer to make this change take effect.