How to adjust virtual memory?

Source: Internet
Author: User
Tags temporary file storage backup

Memory is very important in the computer, all the programs running in the computer need to go through the memory to execute, if the execution of the program is very large or many, will lead to memory consumption exhausted. To solve this problem, Windows uses virtual memory technology, that is, to take out a part of the hard disk space to act as memory, when the memory is exhausted, the computer will automatically call the hard disk to act as memory, to ease the memory tension. For example, if the computer has only 128MB of physical memory, when reading a file with a capacity of 200MB, you must use a larger virtual memory, the file will be read after the memory is stored in virtual memory, waiting for memory to store all the files to virtual memory, Then you will release the virtual storage files into the original installation directory.

When the system is running, the required instructions and data must be taken from external storage (such as hard disk, floppy disk, CD-ROM, etc.) into the memory, the CPU from the memory to read instructions or data for operation, and the results of the operation into memory, the role of memory as a "setter" role. When you run a program that requires a lot of data and consumes a lot of memory, memory this warehouse will be "stuffed", and in this "warehouse" there is always a part of the temporary use of data occupy a limited space, so this part of the "lazy" data "please" out to make room for "active" data use. Then you need to create another fallback "warehouse" to store "lazy" data. Because of the large amount of space on the hard disk, Microsoft Windows operating system will be the backup "warehouse" address selected on the hard disk, the backup "warehouse" is virtual memory. By default, virtual memory is saved in the system partition of the hard disk with a swap file named Pagefile.sys.

First, set up virtual memory manually

The default state is to let the system manage virtual memory, however, the system default settings are usually more conservative management, in the automatic adjustment will cause the paging file is not continuous, and reduce the efficiency of reading and writing, the efficiency is not high, so often appear "insufficient memory" such a hint, let us start to set it.

① the "My Computer" icon on the desktop by right-clicking the "Properties" option in the right click menu to open the System Properties window. Click the "Advanced" tab in the window and the dialog box for advanced settings appears.

② Click the Settings button in the performance area to open its dialog box by selecting the Advanced tab in the Performance Options window that appears.

③ the dialog box to see the area of virtual memory, click the "Change" button to enter the "Virtual Memory" settings window. Select a partition with a larger free capacity, check the box before custom size, and fill in the value in the original large

Second, tailor-made virtual-like memory

1. General Setting method

According to the general setting method, the virtual memory swap file minimum and maximum can be set to 1.5 times times the memory capacity, but if the memory itself is large, such as memory is 512MB, then it occupies a considerable amount of space. So we can set the basic value of virtual memory: the memory capacity below 256MB, set to 1.5 times times; over 512MB, set to half the memory capacity, between 256MB and 512MB set to the same value as the memory capacity.

2. Precise setting method

Because everyone actually operation of the application is not the same, such as some people want to run 3DMAX, Photoshop, such as large programs, and some people may just typing, playing games, so the requirements of virtual memory is not the same, so we have to adapt to local conditions to accurately set the value of virtual memory space.

① first the virtual memory custom "Initial size", "maximum" set to two identical numeric values, such as 500MB;

② then opens "Control Panel → admin tools → performance" in turn, in the Performance dialog box that appears, expand Performance Logs and Alerts in the left column, select the counter log below, right-click in the blank in the right-hand column, and select the "New Log Settings" option in the right menu.

③ in the pop-up dialog box "name" column to fill in any name, such as "virtual memory test." Click the "Add Counter" button in the window to enter the next window;

④ opens the Drop-down list of performance objects in this window. Select "Paging File", tick "Select counter from List", and select "%usage Peak" in the column below, check "Select sample from List", select "_total" in the column below, Click "Add → close" again to end

⑥ in the right-hand column can find a more "virtual Memory Test" project, if the project is red is not started, click on the item, select the right menu in the "Start" option can

Then run some of your favorite apps, run for a while, go to the default directory "PerfLogs" under the system partition where the log files are located, locate the "virtual memory Test _000001.csv" and open it with a Notepad program, where we look at the penultimate number in each column, This value is the usage ratio of virtual memory, find the maximum value of this number, such as "46" in the figure, with 46% times 500MB (the virtual memory value set above), the value is 230MB.

The initial size can be set to 230MB, and the maximum value can be set freely according to disk space size, which is generally recommended to be set to 2 to 3 times times the minimum value. So we can make virtual memory more accurate, so that their love machine run more smoothly, more efficient.

Small, maximum, and then click the "set → ok" button, and finally restart the computer for virtual memory settings to take effect.

Recommendation: Can be divided into a small partition dedicated to virtual memory, ie temporary file storage and other uses, the partition can be regularly disk collation, so as to better improve the efficiency of the computer

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.