Understanding Windows virtual memory problems

Source: Internet
Author: User
Tags temporary file storage

This article describes in detail the settings of virtual memory and solutions to related problems.

The computer has a great role in the computer. All the running programs in the computer need to be executed through the memory. If the program is large or large, it will cause the memory to 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.

· Users must understand Windows virtual memory problems (2)
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 efficiently.

· Users must understand Windows virtual memory problems (3)
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?

2. 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.

3. sufficient space is required for the hard disk

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.

4. 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.

5. 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:

· Users must understand Windows virtual memory problems (4)
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.

6. 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.