Joke Collection Website - Joke collection - Why is there insufficient virtual memory in the system after completing 9.1?

Why is there insufficient virtual memory in the system after completing 9.1?

LZ, virtual memory is very inconspicuous in Windows XP. Windows XP will automatically set it up when it is installed, and the user does not even need to pay attention to this file. However, virtual memory, as a supplement and extension of physical memory, plays a decisive role in the stable operation of Windows XP. If it is not set properly, it will affect the overall performance of the computer.

Party A: When I was running a 3D game on the Windows XP operating system, I suddenly saw a prompt like "Insufficient Virtual Memory" pop up in the system tray area. I think this problem has occurred before, how should I solve it? (Click to see more software usage tips)

Party B: Virtual memory uses part of the hard disk space as memory. Although the running speed of the hard disk cannot be compared with that of the memory, the capacity is higher than that of the memory. Out a lot. Its function is to transfer some data that is read into the memory but not used temporarily into virtual memory, so that the memory space can be released and the limited memory space can continue to store unread data.

When a prompt of insufficient virtual memory appears, if it is not resolved, it will affect the efficiency of the system. At this time, the initial value and maximum value of the virtual memory are set to the same value, which can greatly improve the performance of the system.

Party C: The solution mentioned by Party B is wrong. This is because if the initial value and maximum value of virtual memory are set to the same two values, then when the initial page file is large, a data file with a smaller capacity in the memory may be read, so that it The lower the proportion of virtual memory, the slower the execution speed. If the virtual memory has very few initial pages, then when the data exceeds the capacity of the initial page file, it will automatically overflow to the maximum page file. However, since the capacity of the maximum page file is the same as the capacity of the initial page file, memory overflow will occur. Mistakes are inevitable.

So when we set the virtual memory size, we should set the initial page file to a smaller capacity, so that we can store more data in the memory as much as possible, improve its efficiency, and at the same time improve The maximum page file capacity to prevent the "Insufficient Virtual Memory" prompt from appearing again.

The above are the basic principles for setting virtual memory. If you want to set the specific virtual memory capacity, you may wish to use the following two methods:

The first method Relatively simple.

Click the system menu "Start → Control Panel", double-click the "System" component in the "Control Panel" window, click the "Advanced" tab on the window, click on the "Performance" area Click the "Settings" button. Click the "Advanced" tab in the dialog box that opens, and click the "Change" button in the "Virtual Memory" area to enter the virtual memory settings window.

Select the partition drive letter in the "Drive" column of the window. Since the hard disk reads data by using magnetic heads on magnetic materials, and there are many system files in the system disk, if the page file of the virtual memory is also located on the system disk, the page file must be discontinuous, and the back and forth reading of the magnetic head will affect the system. performance, so we can set the virtual memory file in a separate partition other than the system partition.

Then click the "Custom size" option in the "Page file size of the selected drive" area, and fill in the corresponding values ????in the "Initial size" and "Maximum value" columns.

According to Microsoft's recommendations, the minimum value of the virtual memory swap file should be set to 1.5 times the memory capacity. However, if the memory capacity is 512MB or even 1GB, then it will definitely take up a lot of space. Therefore, when the total memory capacity is below 256MB, set the minimum value of virtual memory to 1.5 times; when it is above 512MB, set it to half the memory capacity; between 256MB and 512MB, set it to the same value as the memory capacity.

The second method of setting up virtual memory is a bit complicated, but more targeted.

First run the frequently used applications on your computer, and then open the "Windows Task Manager" window. Click the "Performance" tab of the window, and the "Physical Memory" and "Approved Usage" will be displayed on the page that appears.

If the "available number" of "physical memory" is smaller than the actual capacity of physical memory, it means that the current physical memory is enough. If the "Total", "Peak" and other values ??displayed in the "Approved Usage" area exceed the existing capacity of the virtual memory, then you can enter the virtual memory settings window and change the "Initial Size" of the virtual memory. A capacity with a value close to the "Total" and "Peak" values ??is sufficient.

Let’s talk about how to set up virtual memory

After installing Windows, most people may let the system automatically handle virtual memory. If you are just typing on the Internet, you really don’t need to worry about this stuff, but if you want to perform video playback, editing, 3D games and other resource-intensive tasks, you need to be careful about setting your own virtual memory. The setting of virtual memory affects the speed of the system, the amount of disk fragmentation, and even the stability of the system. It should not be underestimated. Although this issue has been discussed in many articles, the author will talk about how to set virtual memory according to different task types:

1. Set up virtual memory to reduce disk fragmentation

When installing Windows, the default virtual memory is placed in the partition where the system is installed, and the size is generally 1.5 times the physical memory. Since Windows will also place temporary files (TEMP directory and *.TMP) and IE buffers in this partition, these files will be frequently updated and written to the hard disk. If coupled with virtual memory, the number of file fragments generated will be relatively large. . The author believes that instead of using defragmentation software to spend a lot of time defragmenting, it is better to divide a partition specifically for these files so that they have continuous space available at any time, and the speed will be faster. It is recommended to separate a partition of about 2G, and put all the paths of TEMP and IE buffers directly to this partition. Of course, the virtual memory is also placed on it. Suppose you use the E drive as this partition. When you want to clean it up at a certain time, simply Simply clear the files in DOS or quickly format the E drive.

2. Knowledge of virtual memory size

Virtual memory has great differences in the running speed and stability of the system under different Windows versions and different task environments. . Therefore, it is best for friends to set the settings according to their actual situation:

1. 3D game-based applications

3D games are very demanding on CPU, graphics card, and memory. For applications, most people's memory will not exceed 256M, so hard drives will also join the ranks to help temporarily exchange data. The author recommends that you preset the virtual memory to be larger. This is because 3D rendering of character and scene models requires a large amount of memory resources, and the virtual memory will also become very large. During the game, the calculation amount of the game itself is already very large. The CPU is under heavy load. If the initial virtual memory is not enough and needs to be temporarily increased, Windows will write new data to the disk - obviously, generating larger files during the game is different from changing settings in normal times, and the overall system speed will decrease. Be slowed down and sometimes even cause illegal operations due to out-of-sync memory and disk speeds. When I was playing CS1.5 version, I found that a certain map frequently exited illegally, and the hard disk light flashed wildly. Later, I tried to increase the initial virtual memory to more than 750M, and the game stability immediately increased greatly. It proves that the impact of virtual memory on this kind of task is quite large. It is recommended that if there is enough space, the initial value is set to more than 800M, which is helpful for the smoothness of the game.

2. Applications that mainly play and enjoy videos

Video applications also have a huge appetite for hard drive space, but don’t think that they should be treated like 3D games. The virtual memory is set to a very large size, especially for users of Windows , which means that PAGEFILES.SYS will get bigger and bigger, especially after playing video streaming files such as RM and ASF. If you put the virtual memory and XP in the same partition, Windows will often prompt you that the virtual memory is set too small. , or there is insufficient disk space and you need to clear unnecessary junk files.

At this time, check the page exchange file, it is already 1G; also, if you do not use the FTP tool to download the file, but use IE to directly click the link, XP will also temporarily store the data in the Windows\TEMP directory first, which is also the case often It will not be deleted automatically. Therefore, you will find that the partition where XP is installed is getting smaller and smaller. It is recommended that XP users who play video files and do not have the conditions to set up a special partition for virtual memory should set the initial value smaller, so that the probability of a warning indicating insufficient space will be smaller. . Of course, the most fundamental way is to transfer the virtual memory storage partition, or use PQ to add more space to the XP partition.

3. The impact of virtual memory on other aspects

There are many friends who are new to computers and use Windows 98. The name of the virtual memory in Windows 98 is WIN386.SWP. By default, it is in the root directory of the C drive. There are no hidden attributes. Generally, the size will be automatically changed as needed. Newbies often don't know what this file is. Some people even try to delete it, but it is deleted and regenerated in DOS, but cannot be deleted in the GUI. They think it is infected by a virus, so they go to the forum to ask for help. The author has also seen people who ran PHOTOSHOP and tried to delete WIN386.SWP in the resource manager, but the result was a crash. Therefore, the impact of this virtual memory is quite large. If you are not sure, don't delete files randomly and let Windows handle it. alright. Later, Microsoft learned the lesson and renamed the virtual memory PAGEFILE.SYS and hid it, which saved a lot of trouble.

It can be seen that it is very important to master some necessary common sense when using computers and make backups. For example, people on the forum ask for help every day about Windows damage, over-optimization system crashes and missing hard disk partitions. If you know a little bit about system maintenance, with GHSOT backup and partition table backup, it is an easy thing to solve - of course People who think WIN386.SWP or PAGEFILE.SYS are viruses or Trojans will not laugh at you, haha.

What is virtual memory?

Virtual memory is a part of the hard disk space used by Windows XP as memory. Even if the physical memory is large, virtual memory is essential. The virtual memory is actually a huge file on the hard disk. The file name is PageFile.Sys, which cannot be seen under normal circumstances. You must turn off the explorer's protection function for system files to see this file. Virtual memory is sometimes called the "page file" from the file name of this file.

Setting up the hard disk

To optimize virtual memory, why do we need to set up the hard disk? This is because the virtual memory file (also known as the page file) is stored on the hard disk. Improving the performance of the hard disk can also improve the performance of the memory to a certain extent.

1. Enable disk write caching

Right-click on "My Computer" and select "Properties->Hardware", open the Device Manager and find the hard disk currently in use , right-click and select Properties. In the "Policy" page of the hard disk properties, turn on "Enable write cache on disk", as shown in Figure 1.

This option will activate the hard disk's write cache, thereby increasing the hard disk's read and write speed. However, please note that after this function is turned on, if the computer suddenly loses power, it may cause irreparable data loss. Therefore, it is best to turn on this function when there is a UPS. Of course, if you don’t perform any important data processing work when using your computer, it doesn’t matter if you don’t have a UPS. This function will not cause much damage to the system.

Party A: When I was running a 3D game on the Windows XP operating system, I suddenly saw a prompt like "Insufficient Virtual Memory" pop up in the system tray area. I think this problem has occurred before, how should I solve it? (Click to see more software usage tips)

Party B: Virtual memory uses part of the hard disk space as memory. Although the running speed of the hard disk cannot be compared with that of the memory, the capacity is higher than that of the memory. Out a lot. Its function is to transfer some data that is read into the memory but not used temporarily into virtual memory, so that the memory space can be released and the limited memory space can continue to store unread data.

When a prompt of insufficient virtual memory appears, if it is not resolved, it will affect the efficiency of the system. At this time, the initial value and maximum value of the virtual memory are set to the same value, which can greatly improve the performance of the system.

Party C: The solution mentioned by Party B is wrong. This is because if the initial value and maximum value of virtual memory are set to the same two values, then when the initial page file is large, a data file with a smaller capacity in the memory may be read, so that it The lower the proportion of virtual memory, the slower the execution speed. If the virtual memory has very few initial pages, then when the data exceeds the capacity of the initial page file, it will automatically overflow to the maximum page file. However, since the capacity of the maximum page file is the same as the capacity of the initial page file, memory overflow will occur. Mistakes are inevitable.

So when we set the virtual memory size, we should set the initial page file to a smaller capacity, so that we can store more data in the memory as much as possible, improve its efficiency, and at the same time improve The maximum page file capacity to prevent the "Insufficient Virtual Memory" prompt from appearing again.

The above are the basic principles for setting virtual memory. If you want to set the specific virtual memory capacity, you may wish to use the following two methods:

The first method Relatively simple.

Click the system menu "Start → Control Panel", double-click the "System" component in the "Control Panel" window, click the "Advanced" tab on the window, click on the "Performance" area Click the "Settings" button. Click the "Advanced" tab in the dialog box that opens, and click the "Change" button in the "Virtual Memory" area to enter the virtual memory settings window.

Select the partition drive letter in the "Drive" column of the window. Since the hard disk reads data by using magnetic heads on magnetic materials, and there are many system files in the system disk, if the page file of the virtual memory is also located on the system disk, the page file must be discontinuous, and the back and forth reading of the magnetic head will affect the system. performance, so we can set the virtual memory file in a separate partition than the system partition.

Then click the "Custom size" option in the "Page file size of the selected drive" area, and fill in the corresponding values ????in the "Initial size" and "Maximum value" columns.

According to Microsoft's recommendations, the minimum value of the virtual memory swap file should be set to 1.5 times the memory capacity. However, if the memory capacity is 512MB or even 1GB, then it will definitely take up a lot of space. Therefore, when the total memory capacity is below 256MB, set the minimum value of virtual memory to 1.5 times; when it is above 512MB, set it to half the memory capacity; between 256MB and 512MB, set it to the same value as the memory capacity.

The second method of setting up virtual memory is a bit complicated, but more targeted.

First run the frequently used applications on your computer, and then open the "Windows Task Manager" window. Click the "Performance" tab of the window, and the "Physical Memory" and "Approved Usage" will be displayed on the page that appears. If the "available number" of "physical memory" is smaller than the actual capacity of physical memory, it means that the current physical memory is enough. If the "Total", "Peak" and other values ??displayed in the "Approved Usage" area exceed the existing capacity of the virtual memory, then you can enter the virtual memory settings window and change the "Initial Size" of the virtual memory. A capacity with a value close to the "Total" and "Peak" values ??is sufficient.

Page file settings

Page file size calculation

For different computers, the size of the page file is different. Regarding the setting of the page file size, there are two widely circulated "formulas", "physical memory X2.5" or "physical memory X1.5". Although these two calculation methods are simple, they are not suitable for all computers. The most accurate way to set the page file size is to look at the actual page file size used by the computer in normal operation.

Using the log function that comes with Windows XP, you can monitor the size of the page file that your computer usually uses, so as to make the most accurate settings. The specific steps are as follows.

1. Right-click on "My Computer", select "Properties -> Advanced", click the "Settings" button under "Performance", then select the "Advanced" page, click Change button under Virtual Memory. Select "Custom size" and set both "Start size" and "Maximum value" to 300M. This is only a temporary setting. After the settings are completed, restart the computer for the settings to take effect.

2. Go to "Control Panel -> Performance and Maintenance -> Management Tools", open "Performance", expand "Performance Logs and Warnings", and select "Counter Logs". Right-click on the right side of the window and select "New Log Settings", as shown in Figure 4.

3. Set a log name at will, such as "Monitor virtual memory size", as shown in Figure 5.

4. Click the “Add Counter” button on the “General” page, as shown in Figure 6.

Select "Paging File" in "Performance Objects", then select "%Usage Peak" under "Select counters from list", and select "Select examples from list" on the right "_Total". Finally click the "Add" and "Close" buttons, as shown in Figure 7.

5. Don’t forget to remember the storage location and file name of the log file in the “Log File” page. We will need to check this log later to determine how much virtual memory Windows XP usually uses. In this example , the log files are stored in the D:\Perflog directory, as shown in Figure 8.

In addition, set the "Log File Type" to "Text File" to make it easier to read, as shown in Figure 9.

At this time, you can see that the icon in front of the newly created log entry turns green, which indicates that the logging system is already monitoring the virtual memory. If the icon is still red, you should right-click and select "Start" to start the log.

After a while, open the CVS file and we can see the following entries, as shown in Figure 10.

This log file records the usage of the page file during this period. Note that the unit here is %, not MB. Through simple calculations, we can get the minimum size of the page file. The formula is "page file size X percentage". For example, in this example, the maximum usage ratio of virtual memory is 31%, 300MBX31%=93MB, this value is the minimum value of virtual memory (note that 300MB is the temporary value of the previous setting).

If the physical memory is large, you can consider setting the "Start Size" and "Maximum Size" of the page file to be equal, equal to the size calculated in the previous step. In this way, the hard disk will not be fragmented due to excessive expansion of the page file. The side effect is that because the "maximum value" is set to a smaller value, in case of accidental virtual memory overrun, it may cause the system to crash.

Set the page file

Now return to the "Virtual Memory" settings dialog box, select the custom size and set the "Initial Size" and "Maximum Value" according to the calculation results above. , Figure 11. Here we set the "initial size" to 91M and the "maximum size" to 200M, which is safer.

Defragment the page file

Windows XP requires a large amount of access to the page file when running. If the page file becomes fragmented, system performance will be seriously affected and the use of the hard disk will be shortened. life. Therefore, it is necessary for us to defragment the page file regularly.

But don’t forget, the page file is a key system file and cannot be accessed when Windows XP is running. So defragmenting it is not an easy task. We have two options to choose from. One is to install Windows dual system, and then start another Windows to defragment the partition where Windows XP is located. The second is to use specialized tool software, such as System File Defragmenter, etc. 27573 Hope this helps you!