When your game is playing right, or when you open multiple windows in Passion Surf, your system will always prompt as shown on the right. The machine was slow like a snail at this time, and the good mood just disappeared. In our article, the 20th E5 version of the rookie file, "Retrieve the occupied system disk space", mentioned the simple setting of virtual memory. This problem has attracted the interest of many novice friends, which they often encounter. Case. What is the role of virtual memory? How much is it better? This article will give a detailed introduction to it. All of the following steps use the Windows XP operating system as an example. "Standard room" for creating virtual memory
When the system is running, first transfer the required instructions and data from the external memory (such as hard disk, floppy disk, CD, etc.) into the memory, and the CPU reads the command from the memory. Or the data is computed and the result of the operation is stored in memory. The memory plays a role like a "setter". When running a program that requires a lot of data and takes up a lot of memory, the memory warehouse will be "stuffed", and in this "warehouse" there is always a part of the temporarily unused data occupying a limited space, so this part is to be " "Inert" data "please" out to free up space for "active" data usage. At this point, you need to create another backup "warehouse" to store "lazy" data. Due to the large space of the hard disk, the Microsoft Windows operating system selects the address of the backup "warehouse" on the hard disk. This backup "warehouse" is virtual memory. By default, virtual memory is saved in the system partition of the hard disk as a swap file called Pagefile.sys. Manually setting virtual memory
In the default state, the system manages virtual memory, but the default management mode of the system is usually conservative. In the automatic adjustment, the page file will be discontinuous, and the reading and writing efficiency will be reduced. It doesn't look too high, so there are often tips like "out of memory". Let's set it up. 1 Right-click the "My Computer" icon on the desktop and select the "Properties" option in the context menu that appears to open the "System Properties" window. Click the "Advanced" tab in the window, the dialog box for advanced settings appears (Figure 1); Figure 1 2 Click the "Settings" button in the "Performance" area, select the "Advanced" tab in the "Performance Options" window that appears , open its dialog. 3 In the dialog box, you can see the area about virtual memory. Click the “Change” button to enter the setting window of “Virtual Memory”. Select a partition with a larger free capacity, check the box in front of "Custom Size", fill in the specific values in the "Initial Size" and "Maximum" columns, and then click the "Settings → OK" button. Yes (Figure 2), finally restart the computer to make the virtual memory settings take effect. Figure 2 The above is the setting method of virtual memory in Windows XP operating system. The author also briefly mentions the setting in Windows 98 operating system: In Windows 98 system, go to “Start → Settings → Control Panel → System → Performance → Virtual memory", in the pop-up dialog box, select the "user-specified virtual memory settings" option, set the virtual memory location in the appropriate partition, and set the minimum and maximum virtual memory, and finally click "OK" The button is completed (Figure 3). Figure 3 suggests: You can divide a small partition for virtual memory, IE temporary file storage, etc., and you can periodically defragment the partition, which can improve the working efficiency of the computer. Tailor-made virtual memory
1. Common setting method According to the general setting method, the minimum and maximum values of the virtual memory swap file can be set to 1.5 times the memory capacity, but if the memory itself has a large capacity, such as memory It is 512MB, so the space it takes up is also very impressive. So we can set the basic value of virtual memory in this way: the memory capacity is less than 256MB, it is set to 1.5 times; above 512MB, set to half of the memory capacity; between 256MB and 512MB is set to the same value as the memory capacity . 2. Accurate setting method is not the same as the actual application of each person. For example, some people want to run large programs such as 3DMAX and Photoshop, and some people may just type and play small games, so the requirements for virtual memory are Not the same, so we have to accurately set the value of the virtual memory space according to local conditions. 1 first set the virtual memory custom "initial size", "maximum value" to two identical values, such as 500MB; 2 then open "Control Panel → Administrative Tools → Performance", in the "Performance" dialog box that appears In the left column, expand the "Performance Log and Alarm", select the "Counter Log" under it, right click in the blank space in the right column, select the "New Log Settings" option in the right-click menu; 3 in the pop-up Fill in any name in the "Name" column of the dialog box, such as "Virtual Memory Test". Click the "Add Counter" button in the window to go to the next window; 4 In the window, open the "Performance Object" drop-down list, select "Paging File", check "Select Counter from List", and below Select "%Usage Peak" in the column; check "Select sample from list", select "_Total" in the lower column, and then click "Add → Close" to end (Figure 4). Figure 4 5 In order to view the log file conveniently, you can open the "Log File" tab, select "Log File Type" as "Text File", and finally click the "OK" button to return to the "Performance" main interface; A "virtual memory test" item can be found in the right column. If the item is red, it means that it has not been started. Click this item and select the "Start" option in the right-click menu (Figure 5). Figure 5 Next, run some of your favorite applications. After running for a while, enter the default directory "PerfLogs" under the system partition where the log file is located, find "Virtual Memory Test _000001.csv" and open it with Notepad (Figure 6 In this content, we look at the penultimate value in each column. This value is the usage ratio of virtual memory. Find the maximum value of this value, such as "46" in the figure, multiply by 46% by 500MB. (The value of the virtual memory set previously), the value is 230MB. Figure 6 With this value, the initial size can be set to 230MB, and the maximum value can be freely set according to the amount of disk space. It is generally recommended to set it to 2 to 3 times the minimum value. In this way, we can make the virtual memory more precise and make our love machine run more smoothly and more efficiently.