Win2000 virtualization settings talk about memory optimization

  

When it comes to virtual memory, you can't help but involve the page file (pagefile.sys), the so-called page file. Its function is to set part of the hard disk space to virtual memory, thus expanding the available "memory" space. The running requirements of the program.

Although the read speed and transfer rate of the hard disk are far lower than the memory rate, it is easy to cause the system to work less efficiently and the system response delay, but compared to spending money on hardware to improve system performance, This kind of time and efficiency in exchange for performance is still very good: you can have 1G of virtual memory for a penny, if you really buy such 1G of memory, how much do you have to spend? And the key to the question is: Can your motherboard support 1G of physical memory?

Win9x usually uses the Win386.swp swap file in the installation directory to create virtual memory. However, Win2000 uses the way of page files to create virtual memory. Usually, everyone uses Windows to manage virtual memory according to the default settings of the system. This is convenient, but Windows is compatible with most computer configurations. The default setting is usually conservative, so it works. Efficiency is sometimes low. Skilled users can optimize the virtual memory management of Windows (such as the size and location of the swap file) to try to get higher efficiency.

The management project of the page file in Win2000 In the control panel, enter "Control Panel" and select "System", then select "Change" in "Advanced/Performance Options" to enter "Virtual Memory" setting. The page displays the size of the page file set by the current system, its location, disk free space, and recommended settings for Windows. These properties can be combined with the properties of the page file to optimize settings.

First, the size of the page file

Windows recommended page file minimum (that is, the initial size), should be the current system memory capacity plus 12MB, if the computer system has 256MB of memory, The minimum value of the page file is set to 268MB, so that the operating system can copy all the contents of the memory to the hard disk before crashing or crashing. For users with a memory capacity of less than 256MB, it is recommended to set the minimum value of the page file to be larger, which should be greater than the memory capacity plus 12MB:

1 Computer users using 128MB or less should The current system memory capacity is 1.75 times set to the minimum value of the page file;

2 those users with a memory capacity between 128MB and 256MB can set the current system capacity 1.5 times to the minimum value of the page file.

Of course, setting the minimum value of the page file to be larger than these theoretical values ​​has no effect on the operation of the whole system, and it should be better. The only loss may be that the available space of the hard disk will be corresponding. cut back. If your hard disk space is tight, you can set the page file to be no less than 3/4 of the system memory, so that the system can run stably. If you need to load and unload large software frequently, open a lot of tasks, then you still use the default value to be safer, otherwise it will cause system crashes frequently.

As for the maximum value of the page file, you can set it as large as possible. It is usually recommended to set it to 2 to 3 times the minimum value. You don't care about its specific settings. Compared with the page file management of Win9X system, Win2000 is much more "smart", and its page file can be dynamically set by itself. It automatically expands the size of the page only when needed by the system, which prevents the page file from taking up too much hard disk space and avoids errors due to insufficient memory in complex operations.

Second, the location of the page file

Win2000 allows you to improve the performance of the system by distributing the page file to different physical hard disks (note the hard disk instead of the partition). In theory, this is indeed feasible, but it is necessary to pay attention to the system performance degradation caused by the difference in seek time and transmission speed between the hard disks. Therefore, you should try to choose the fastest hard disk. To store the page file.

Another thing to note is that although Win2k also supports the creation of page files on multiple partitions of the same hard disk, this will not improve the performance of the system, but will significantly reduce the efficiency of the entire system. Because when the operating system needs to read and write page files, if the content to be read is not in the page file of the same partition, the hard disk head will frequently move between the partitions, which will greatly reduce the operating efficiency of the system. From the actual use effect, it is better to store the page files only in one partition. Therefore, it is recommended that people with multiple hard disks should consider the following solutions:

1 more hard disk The speed difference between the two is not large, you can distribute the page file to each hard disk;

The speed difference between 2 hard disks is relatively large, you should store the page file as much as possible to another faster one. (or more) on the hard drive. For a single hard disk user, if the free space of the hard disk allows, you should try to set the location of the page file in the same partition.

Third, the continuity of the page file

The continuity of the page file is not displayed in the relevant settings of Win2000, but in fact it is necessary to talk about it separately. The working efficiency of consecutive page files will be much higher than that of discontinuous ones. The reason is the same as the above saying that the page files are not set to multiple partitions on the same hard disk. It is also due to the movement problem of the hard disk head. The page file will also cause the hard disk head to frequently "jump" between the discontinuous sectors when using the virtual memory, so the page file should be kept as continuous as possible.

You can run WinDisk's own "Disk Defragmenter" and select the "Analysis" function to view the corresponding location of the page file on the hard disk, where the "green" area (system file) is the page file. location. Some people may be suspicious of the discontinuity of the page file, then you can try the following:

If you are a dual system, you can first enter Win9X, cut the Win2000 page file Pagefile.sys Cut into other partitions or hard drives, then paste them back immediately, restart the system to Win2000, run the "Disk Defragmenter" analysis, the green area will be divided into several areas of different sizes, page file The time is piecemeal and discontinuous.

Although the "Disk Defragmenter" provided by Win2000 is much more useful than Win9X, it can't be sorted out for non-contiguous page files. For page file defragmentation, you need a third-party tool, such as Speed ​​Disk. In addition, if you do not have these tools and the partition of the page file or the hard disk is not NTFS format, you can refer to the operation method of the test page file discontinuity:

First enter Win9X from the dual system, and then cut the page file. Cut into other partitions or hard disks, and then use the defragmentation tool under Win9X to sort the corresponding partitions or hard disks. After finishing the finishing, then re-paste the page files back to ensure the continuity of the page files.

Copyright © Windows knowledge All Rights Reserved