This article describes in detail the settings of virtual memory and solutions to related problems.
It plays a major role in computers.ProgramIt must be executed through the memory. If a large number of programs are executed, the memory will be exhausted. To solve this problem, the virtual memory technology is used in windows, that is, some hard disk space is used as the memory. When the memory is used up, the computer will automatically call the hard disk to act as the memory, to ease memory shortage. For example, if the computer only has MB of physical memory, a large virtual memory is required to read a file with a capacity of MB, after the file is read by the memory, it is first stored in the virtual memory. After the memory stores all the files in the virtual memory, then, the files stored in the virtual lining will be released to the original installation directory.
When the system is running, you must first transfer the required commands and data from external storage (such as hard disks, floppy disks, and CDs) to the memory, the CPU then reads commands or data from the memory for computation, and saves the computation results to the memory. The memory acts like a "two-pass operator. When running a program requires a large amount of data and memory, the memory warehouse will be "full ", in this "warehouse", there is always a limited amount of data that is not used for the time being, so we need to "please" this part of "inert" data, to free up space for "active" data use. In this case, you need to create another backup "warehouse" to store "inert" data. Because the hard disk space is very large, the Microsoft Windows operating system selects the backup "warehouse" address on the hard disk, and the backup "warehouse" is the virtual memory. By default, the virtual memory is stored in the system partition of the hard disk as a swap file named pagefile. sys.
Manually set virtual memory
By default, the system manages virtual memory. However, the default Management Mode set by the system is usually conservative. automatic adjustment may cause page files to be discontinuous and reduce the read/write efficiency, work efficiency is not high, so there are often prompts such as "insufficient memory". Let's set it by ourselves.
① Right-click the "my computer" icon on the desktop and select "properties" from the shortcut menu to open the "System Properties" window. Click the "advanced" tab in the window. The Advanced Settings dialog box is displayed.
② Click the "Settings" button in the "performance" area and select the "advanced" tab in the "performance options" window to open the dialog box.
③ In this dialog box, you can see the virtual memory area. Click "change" to go to the "virtual memory" setting window. Select a partition with a large idle capacity, select the check box before "Custom size", and enter the specific values in the "initial size" and "maximum value" columns, click "Settings> OK", and restart the computer to make the virtual memory settings take effect.
Suggestion: A Small Partition can be divided for use in virtual memory and IE temporary file storage. In the future, the partition can be regularly organized on disks to improve computer efficiency.
I. Custom virtual memory
1. General settings
According to the general setting method, the minimum and maximum values of virtual memory swap files can be set to 1.5 times of the memory capacity at the same time. However, if the memory capacity is large, for example, the memory is 512 MB, it also occupies a considerable amount of space. So we can set the basic value of the virtual memory as follows: the memory capacity below 1.5 MB is set to times; the memory capacity above MB is set to half of the memory capacity; the value between MB and MB is set to the same as the memory capacity.
2. Precise setting
Because the applications actually operated by each person cannot be the same, for example, some people want to run large programs such as 3 DMAX and Photoshop, while some may just be typing and playing games, therefore, the requirements for virtual memory are not the same, so we need to precisely set the value of virtual memory space according to local conditions.
① Set the "initial size" and "maximum value" customized for the virtual memory to two identical values, such as 500 mb;
② Open "Control Panel> Management Tools> performance" in sequence. In the displayed "performance" dialog box, expand "Performance Logs and alarms" in the left column ", select "counter log" under it, right-click in the blank area on the right, and choose "New Log Settings" from the right-click menu;
③ Fill in any name in the pop-up dialog box "name", such as "virtual memory test ". In the displayed window, click "add counter" to enter the next window;
④ In this window, open the "performance object" drop-down list, select "Paging file", and select "select counter from List ", select "% usage peak" in the column below, select "select example from list", and select "_ total" in the column below ", click "add> close" to end
⑤ A "virtual memory test" project can be found in the column on the right. If the project is red, it indicates that it has not been started. Click this item and choose "start" from the shortcut menu.
Open it with the Notepad program. In this content, we can view the second-to-last value in each column. This value is the usage ratio of the virtual memory and find the maximum value of this value, in the ratio of "46", multiply the value by 46% MB (the previously set virtual memory value) to 500 mb.
With this value, you can set the initial size to 230 MB, and the maximum value can be set freely Based on the disk space size. Generally, we recommend that you set it to 2 to 3 times the minimum value. In this way, we can make the virtual memory more accurate and make our machine run more smoothly and more efficiently.
Ii. Windows virtual memory Acceleration
Virtual Memory is very important for any version of Windows. If properly configured, it will greatly improve computer performance and speed. However, by default, windows always sets virtual memory to 1.5 times the physical memory. In this way, if you install 2 GB memory, the system will free up to 3 GB of hard disk space as virtual memory. However, considering the memory needs of mainstream applications and games, there is no need to use so much virtual memory. Is there any secret or trick to make the virtual memory more efficient or more performance?
1. Separate multiple hard disks
Setting the virtual memory on a fast hard disk makes the virtual memory more efficient. However, if the two hard disks on the computer are equally fast, the virtual memory should be evenly allocated to two different hard disks (not different partitions of the same hard disk ). Because synchronous read/write operations will more effectively improve the overall virtual memory performance of the system.
For example, if you have set a virtual memory of 350 Mb on hard disk C, you can try to re-allocate the disk C to MB, disk D adds MB of virtual memory. Theoretically, this will accelerate the overall read/write operation of the virtual memory.
2. the hard disk must have sufficient space.
If you are not a very experienced computer user or do not have any special requirements, select "system-managed size" in Windows XP to automatically process the virtual memory, generally, it is safer and more stable than the "Custom size" method. However, you must note that the "page file" (pagefile. sys) will shrink and expand as the computer is used. To make the system management virtual memory more smooth and flexible, we must ensure that the disk where the paging file is located has enough space.
3. The minimum value is equal to the maximum value.
Select the "Custom size" method to process the virtual memory, and set the maximum and minimum values to the same value. Many believe that using this method to process virtual memory helps improve system performance. The reason they hold is that when both the maximum and minimum values are equal, the system does not need to shrink and expand page files at any time. This reduces the need for improving system efficiency.
Many people believe this method is effective, but some people also point out that it is ineffective. But in any case, if we want to set the maximum and minimum values to be equal, we must stick to the principle that the virtual memory size must be sufficient, otherwise, the system will experience lower efficiency (more write operations are required to free up space), and serious problems will cause system instability.
4. Organize page files
After the file data has been stored on the hard disk for a long time, fragment will naturally generate. To maintain or improve the efficiency of the hard disk, We Should fragment the hard disk from time to time. The so-called virtual memory is actually a data file on the hard disk. Should the virtual memory be organized like a common file?
The Windows system processes page files (Virtual Memory) in a way different from general files. In contrast, page files are less fragmented than normal files, and it is usually unnecessary to organize page files. In fact, when Windows XP is used for disk fragment, page files are not involved.
Although Windows does not sort out page files, in fact there are fragments of page files. Friends who are pursuing perfection may still want to fragment page files. Try the following method:
Right-click the "my computer" icon on the desktop and select "properties" from the function menu that appears later ". In the system attribute settings window, click "advanced"> "performance"> "Settings"> "advanced"> "change ", in the subsequent "Virtual Memory" settings window, select "non-paging files. Click "set" to exit and restart the computer.
After the disk is restarted, check whether the pagefile. sys page file exists in the root directory of the disk. If yes, delete it. After the page files of the virtual memory are cleared, we can refresh the disk. After that, follow the previous steps to reset a certain amount of virtual memory and start the computer to make it take effect. After the above method is processed, the new page file will not be fragmented.
In addition, what if I want to view the details of page file fragments? Start the disk fragment program and perform an "analysis" for the hard disk with a page file. Then, click "View Report" to see the "Page File Fragment" column.
5. Ideal virtual memory size
How much virtual memory should I set to handle the virtual memory in the "Custom size" method? In Windows XP, if the virtual memory is defined by the operating system, the system usually sets the minimum value to 1.5 times the physical memory. During expansion, the maximum value is between 2.5 to 3 times of the physical memory. Generally, you can refer to this ratio to customize the virtual memory size.
Do you really need to refer to this proportion? If I have 1 GB of memory on my computer, it is difficult to set the minimum value to 1.5 GB. The maximum value is 2.5 to 3 GB. In this way. The pagefile. sys page file must be at least 1.5 GB, which is unrealistic!
In fact, the standard for a large memory system is different from that for a small memory system when setting virtual memory.
If you have more than MB or even 1 GB of memory, since the physical memory is already quite adequate, the required virtual memory should be reduced. Therefore, in a large memory system, the minimum value of virtual memory can be set to half of the physical memory. For example, with 1 GB of memory, the minimum value of the virtual memory is 512 MB, and the maximum value is 3 GB for emergency purposes. Note: although the maximum value is set to 3 GB, the system will not immediately display the pagefile. SYS file of 3 GB size. In fact, it will first appear at the minimum value and will only increase when there is a need for expansion.
In addition, some friends with large memory may simply choose not to set virtual memory to force the system to use faster memory. In fact, this is not wise. The so-called everything should not be done too absolutely, and it will not work if there is no virtual memory at all. The reason is that many applications require virtual memory to be used during design. If they are not used, the system may be unstable or the system will crash.
For systems with small memory, such as 256 MB, the ratio is the most stable according to the ratio of 1.5 times and 3 times. That is, the minimum value of the virtual memory is 384 Mb, and the maximum value is 768 MB.
6. Manually customize the most accurate virtual memory
0.5 times, 1.5 times, 3 times, wow! It seems that clothes are big, medium, and small, and have no personality at all. Is there a more "tailored" way to set virtual memory?
Enter perfmon. MSC in "start"> "run" on the Windows XP desktop, and a monitor related to system performance will appear. Check the bottom of the monitor. There are three counters (pages/sec, avg. Disk queue length, and rocessor time ,). To facilitate precise monitoring of the page files in the virtual memory, please click the three counters one by one and press the delete key on the disk to delete them. Please rest assured that after deletion, the three items will reappear the next time you start the system performance monitor.
After deletion, right-click in the center of the chart and select "add counter" from the function menu that appears, select "process" in the "performance object" column that appears ". Then, click "page file bytes" in the "select from List" column ". The meaning of "page file bytes" is unclear. You only need to click the "Description" button to display the comments in the dialog box.
Select "page file bytes", select "Total" in the "select example from List" column on the right, and then click "add" and "close, A counter named "page file bytes" appears under the Performance Monitor.
Repeat the preceding actions and add a counter named "page file bytes peak" (that is, the page file bytes peak under process ).
Now, let's look back at the monitor. The chart should display and measure the two newly added counters. If no accident occurs, the two counters are incorrectly displayed on the chart, that is, the value is close to the maximum proportion line and does not change dynamically. Don't be afraid. This doesn't mean something went wrong with your computer. It's just that the chart ratio is not set properly! Right-click the "Page fele bytes" and "page file by8tes peak" counters at the bottom of the monitor, and select "attribute. On the "data" Page, change the "proportion" column to 0.0000001, so that the charts on the monitor are no longer dynamic.
If you have read the instructions provided by the system, you should know that "page file bytes" and "page file bytes peak" represent the virtual memory used during system monitoring and its peak value. Therefore, you need to set the virtual memory precisely. For details, refer to the number shown below the chart. The unit is bytes.
Want to know how much virtual memory your system will consume under normal circumstances? Please start and start the applications that are commonly used at the same time and let them start working. Then, let's take a look at the values displayed on the Performance Monitor.
When people are crazy, they want to know how much virtual memory they need to use their computers. Now they can start and run the programs on their computers (for example, open more than 10 IE browser windows to access the Internet, play MP3 and DVD movies, and then burn the discs or compress the DV videos) to see how much the percentage of the monitor will increase.
Right-click the chart and click "properties". On the "chart" Page, select "horizontal grid line. In this way, there will be horizontal split lines in the chart. Is it better to tell?
The red vertical lines in the chart run too fast to start the program on the computer for testing?
Similarly, right-click the chart and select "properties". In the "Automatic Sampling Interval" item on the general page, change 1 second to 5 seconds. In this case, the "graph time" value in the chart changes from 1 minute 40 seconds to 8 minutes 20 seconds. In other words, it takes 8 minutes 20 seconds to walk the circle in a red vertical line. This time should be enough for everyone to start and run many applications, and then slowly view the results in the chart.
Finally, through the monitor chart, we believe that you can roughly estimate the virtual memory size of your computer system.
Iii. Several possibilities of "insufficient Virtual Memory"
1. Virus Infection
Some viruses occupy a large amount of memory space during attack, leading to insufficient memory in the system. Go to antivirus, upgrade the virus database, and take anti-virus measures!
2. Improper virtual memory settings
Improper virtual memory settings may also cause insufficient memory. Generally, the virtual memory size is twice the physical memory size. If it is set too small, it will affect the normal operation of the system program. Re-adjust the virtual memory size. Take WINXP as an example. Right-click "my computer" and select "properties". On the "advanced" tab, click "set" in the "performance" box, switch to the "advanced" tab, click "change" in the "virtual memory" box, and then reset the virtual memory size. Then, restart the system.
3. Insufficient system space
The virtual memory file is in the system disk by default. For example, the virtual memory file name of WINXP is "pagefile. sys ". If the remaining space on the system disk is too small, the virtual memory is insufficient and the memory is insufficient. The system disk must retain at least MB of space. Of course, this value depends on your actual needs. Users should try not to install various applications on the system disk to ensure that there is sufficient space for virtual memory files, and it is best to place the virtual memory files in non-system disks.
4. Incorrect system user permission settings
When an NT-based Windows system is started, the System user creates a virtual memory file for the system. Some users use the NTFS file system for system security, but cancel the System user's "write" and "modify" permissions on the system disk, so that they cannot create virtual memory files for the system, when running a large program, the memory is insufficient. The problem is well solved. You only need to re-grant the System user the "write" and "modify" permissions, but this is only for users who use the NTFS file system.
Iv. Optimization of virtual memory
1. Enable disk write Cache
On "my computer", right-click and choose "properties-> Hardware", open the Device Manager, find the hard disk currently in use, and right-click and select Properties. On the "Policy" page of the hard disk attribute, enable "Enable write cache on disk ".
This option will activate the hard disk write cache, thus improving the read/write speed of the hard disk. However, after enabling this function, a sudden power failure on the computer may cause irreparable data loss. Therefore, it is best to enable this function again when there is a UPS. Of course, if you do not perform any important data processing work when using a computer, it does not matter if you do not use UPS. This function will not cause too much loss to the system.
2. Enable ultra MDA
In device management, select "Basic/secondary ide controller" in the ide ata/atapi controller, right-click and choose "properties" to go to the "Advanced Settings" page. The most important setting item here is "transmission mode". Generally, select "DMA (if available )".
3. Configure recovery options
When a fatal error occurs during Windows XP running, the memory snapshot is saved as a file for system debugging. For most common users, this file is useless, instead, it will affect the performance of the virtual memory. So close it.
Right-click my computer, select Properties> advanced, and click set under performance, select the "advanced" page in "performance options. Here is a "memory usage" option. If you set it to "system cache", Windows XP uses about 4 MB of physical memory as the cache for read/write hard disks, this greatly improves the data exchange speed between physical memory and virtual memory. By default, this option is disabled. If the computer has enough physical memory, such as MB or more, you 'd better enable this option. However, if the physical memory is tight, the default option should be retained.
Page File Settings
Page file size Calculation
For different computers, the size of page files varies. There are two widely used "formulas" for page file size settings, "physical memory x2.5" or "physical memory x1.5 ". These two computing methods are simple, but they are not suitable for all computers. The most accurate way to set the page file size is to check the actual page file size used by the computer during normal operation.
You can use the log function provided by Windows XP to monitor the size of page files commonly used by your computer, so as to perform the most accurate settings. The specific steps are as follows.
1. Right-click my computer, select Properties> advanced, click set under performance, and select the Advanced page, click "change" under "Virtual Memory. Select "Custom size" and set "Start size" and "maximum value" to 300 mb. This is only a temporary setting. After the settings are complete, restart the computer to make the settings take effect.
2. Choose "Control Panel"> "performance and maintenance"> "Management Tools", enable "performance", expand "Performance Logs and warnings", and select "counter logs ". Right-click on the right of the window and select "New Log Settings"
3. Set a log name, for example, "monitor virtual memory size ".
4. Click "add counter" on the "General" page.
Select "Paging file" in "performance object", and then select "% usage peak" under "select recorder from List ", select "_ total" in "select example from List" on the right ". Click Add and close.
5. Remember the location and file name of the log file on the "Log File" page. We need to check the log later to determine how much virtual memory is usually used by Windows XP. In this example, log files are stored in the D: \ perflog directory.
Set "log file type" to "text file" to facilitate reading.
Now you can see that the icon in front of the newly created log entry turns green, which indicates that the log system is already monitoring the virtual memory. If the icon is still red, right-click and select start to start the log.
After opening this CVS file for a while, we can see the entries in the following content.
This log file records the usage of page files during this period of time. Note that the unit here is % rather than MB. After a simple calculation, we can get the minimum size of the page file. The formula is "page file size x percentage ". In this example, the maximum usage ratio of the virtual memory is 31%, mbx31 % = 93 mb. This value is the minimum value of the virtual memory (note that Mb is the temporary value set above ).
If the physical memory is large, you can set the "Starting size" and "maximum size" of the page file to equal to the size calculated in the previous step. In this way, the disk fragments are not generated due to the transitional expansion of page files in the hard disk. The side effect is that the "maximum" value is set to a small value. In case of unexpected virtual memory overspending, the system may crash.
Set page files
Now return to the "virtual memory" Setting dialog box, select the Custom size, and set the "initial size" and "maximum value" according to the above calculation results ". Here, we set the "initial size" to 91 m, and the "maximum" to 200 m, which is safer.
Fragment of page files
Windows XP requires a large number of page files to be accessed during running. If the page files are fragmented, the system performance will be seriously affected and the hard disk service life will be shortened. Therefore, it is necessary to regularly fragment page files.
But don't forget that the page file is a key file in the system and cannot be accessed during Windows XP running. So it is not easy to fragment it. We have two options: one is to install the Windows dual system, and then start another windows to fragment the partition where Windows XP is located. Second, use specialized tool software, such as system file Defragmenter.