Windows XP Virtual Memory optimization

Source: Internet
Author: User
Tags file size memory usage

Setting up virtual memory in a Windows XP system is very inconspicuous and is automatically set up when Windows XP is installed, and users do not have to bother with it. However, virtual memory, as a supplement and extension of physical memory, plays an important role in the stable operation of Windows XP, if the setting is not good, it will affect the overall performance of the computer. It is also very easy to run the error of the program can not be smoothly running the phenomenon.

 What is virtual memory?

Virtual memory is a part of the hard disk space that Windows XP uses as memory. Even if the physical memory is large, virtual memory is essential. Virtual inside the hard disk is actually a gigantic file, the filename is Pagefile.sys, usually the state is not visible. You must turn off the protection of the resource manager for system files to see this file. Virtual memory is sometimes referred to as a "paging file" that comes from the file's filename.

  Hard Drive settings

Optimize virtual memory, why do hard disk settings? This is because the virtual memory file (that is, often said paging file) stored on the hard disk, improve the performance of the hard disk can also improve the performance of the memory to some extent.

1. Enable disk write caching Click the right mouse button on my computer to select Properties-> hardware, open Device Manager to locate the hard drive you are currently using, and right-click to select Properties. On the policy page of the hard disk properties, turn on enable write caching on disk.

This option will activate the hard drive's write cache to increase the drive's read and write speed. Note, however, that when this feature is turned on, a sudden power outage on the computer can result in irreparable data loss. Therefore, it is best to turn this feature on with UPS. Of course, if you normally use the computer do not do any important data processing work, no UPS does not matter, this function will not cause too much damage to the system 2. Open Ultra MDA in Device Management Select the primary/secondary IDE controller in the IDE ATA/ATAPI controller, right-click Select Properties, and open the Advanced Settings page. The most important setup item here is "transfer Mode", which should generally be selected as "DMA (if available)".

3. Configure recovery options When a fatal error occurs during Windows XP run, a snapshot of the memory is saved as a file for system debugging purposes, which is useless for most ordinary users and affects the performance of virtual memory. So it should be closed.

Right-click on My Computer, select Properties-> Advanced, click the Settings button under Performance, and select the Advanced page in Performance options. There is a "memory usage" option that, if set to system cache, Windows XP uses about 4MB of physical memory as a cache for read and write hard disks, which can greatly increase the speed of data exchange between physical and virtual memory. By default, this option is turned off, and if your computer has more physical memory, such as 256M or more, you might want to turn this option on. However, if physical memory is more stressful, the default option should be retained.

  Settings for the paging file

Size Calculation of paging file

Paging files vary in size for different computers. About the paging file size setting, there are two widely circulated "formulas", "Physical memory X2.5" or "Physical memory X1.5". These two methods of calculation are simple, but they are not applicable to all computers. The most accurate way to set the paging file size is to look at the size of the paging file that the computer actually uses in the normal run.

The log feature with Windows XP allows you to monitor the size of the paging file that your computer normally uses, and to make the most accurate settings, as shown in the following steps.

Right-click on My Computer, select Properties-> Advanced, click the Settings button under Performance, and then select the Advanced page, and click the Change button under virtual memory. "" Select Custom size and set the start size and maximum values to 300M, which is only a temporary setting. Restart the computer when Setup is complete to make the settings take effect.

Second, enter the control Panel-> performance and maintenance-> management tools, open performance, expand Performance Logs and warnings, and select counter logs. Right click on the right mouse button to select new log settings; Third, set up a random log name, such as "Monitoring virtual memory Size";

Click the Add Counters button on the General page, select Paging File in the performance object, select%usage Peak under Select registers from list, and select _total from the Select an example from list on the right hand side of the box. Finally, click the Add and Close buttons.

Don't forget to remember the location and file name of the log file in the log file page. We need to look at this log later to determine how much virtual memory Windows XP normally uses, in this case the log files are stored in the D:perflog directory, and the log file type is set to Text file ", so that it is easy to read. 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 virtual memory. If the icon is still red, you should click the right mouse button to select "Start" to start the log.

This log file records the use of the paging file for this period of time, noting that the unit here is%, not MB. With a simple calculation, we can get the minimum size of the paging file, which is "page file size x percent". For example, the maximum usage rate for virtual memory is 31%,300MBX31%=93MB, which is the minimum value of virtual memory (note that 300MB is the temporary value of the previous setting).

If the physical memory is large, consider setting the paging file start size and maximum to equal, equal to the size calculated in the previous step. This will not cause disk fragmentation due to the expansion of the paging file in the hard drive, and its side effect is that the "maximum" is set to a lesser size, in case of accidental virtual memory overruns, which can cause the system to crash.

  Setting the paging file

Now go back to the Virtual Memory Settings dialog box to select a custom size and set the initial size and maximum values according to the results of the above calculations. Here we set the "Initial size" to 91M, and the "maximum" set to 200M, which is more insurance.

  Defragment a paging file

Windows XP runs with a large amount of access to the paging file, and if the paging file is fragmented, the system performance will be severely affected and the hard disk life will be shortened. So it is necessary for us to defragment the paging file regularly.

But don't forget, the paging file is a system-critical file that Windows XP cannot access while it is running. So it's not easy to defragment it. We have two options, one is to install the Windows dual system, and then start another windows to defragment the partition where Windows XP resides. The second is to use specialized tool software, such as System File defragmenter

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.