2. Optimize the Page File
"In modern operating systems, including Windows, application programs and many system processes always reference memory using virtual memory addresses which are automatically translated to real (RAM) addresses by the hardware. Only core parts of the operating system kernel bypass this address translation and use real memory addresses directly. Virtual Memory is always in use, even when the memory required by all running processes does not exceed the amount of RAM installed on the system. All processes (e.g. application executables) running under 32 bit Windows gets virtual memory addresses (a Virtual Address Space) going from 0 to 4,294,967,295 (2*32-1 = 4 GB), no matter how much RAM is actually installed on the computer. In the default Windows OS configuration, 2 GB of this virtual address space are designated for each process' private use and the other 2 GB are shared between all processes and the operating system. Normally, applications (e.g. Notepad, Word, Excel, Acrobat Reader) use only a small fraction of the 2GB of private address space. The operating system only assigns RAM page frames to virtual memory pages that are in use. RAM is a limited resource, whereas virtual memory is, for most practical purposes, unlimited. There can be a large number of processes each with its own 2 GB of private virtual address space. When the memory in use by all the existing processes exceeds the amount of RAM available, the operating system will move pages (4 KB pieces) of one or more virtual address spaces to the computer's hard disk, thus freeing that RAM frame for other uses. In Windows systems, these "paged out" pages are stored in one or more files called pagefile.sys in the root of a partition." – Source
Default - Windows XP by default uses a system managed Page File that works well for the majority of users and will automatically set the Page File to the following size based on how much RAM is in your system:
- Initial size (MB): 1.5 x the amount of RAM in your system
- Maximum size (MB): 3.0 x the amount of RAM in your system (PF Size Limit = 4095 MB)
Gaming – If you frequently use memory intensive applications (such as High End Games) it is possible that the Page File will resize during application use, this can affect performance. A properly configured Page File will not resize (increase) so long as the Initial size is set large enough. Allowing the Page File to resize is recommended for unforeseen memory intensive situations and will prevent "Out of Memory" error messages from occurring. Any resizing will reset to the default Initial size upon reboot and will not cause any permanent fragmentation of the Page File. Setting the Initial size too large has no negative impact on system performance except to waste disk space if it is not used. Since disk space is usually plentiful it is safer then setting it too small. All arguments about setting the Page File smaller are to conserve disk space and have nothing to do with performance. It is recommended to increase the Initial size by increments of .5 x until the resizing stops.
Instructions – Go to "Start", "Settings", "Control Panel", "System", "Advanced" tab, in the "Performance" section select "Settings", "Advanced" tab, in the "Virtual Memory" section select "Change". Change the values to:
- Initial size (MB): 2.0 x the amount of RAM in your system
- Maximum size (MB): 4095 MB
Then select "Set" and "OK" and reboot.
A permanent solution is to add more RAM to your system. It is a good idea to have at least 1 GB to 2 GB of RAM in a PC today. A simple test to determine if you need more RAM is to use you PC for a whole day without rebooting, then look at the Task Manager (Ctrl-Alt-Delete), Performance tab. If the "Commit Charge – Peak" is ever higher then the "Physical Memory – Total" your system could benefit from adding more RAM. When you change the amount of RAM in your system, you have to adjust the Page File size if you adjusted it manually. If you left it at System managed, Windows XP will adjust this for you.
Optimization - "Moving the Page File to a separate physical Harddrive (not partition) from the boot partition will increase Page File performance. However, if you remove the paging file from the boot partition, Windows cannot create a dump file (Memory.dmp) in which to write debugging information in the event that a kernel mode Stop Error message occurs. The optimal solution is to create one paging file that is stored on the boot partition, and then create a second paging file on a separate physical Harddrive (not partition) Windows will use the pagefile on the less frequently used partition over the pagefile on the heavily used boot partition. Windows uses an internal algorithm to determine which page file to use for virtual memory management." – Source
Advanced - The ultimate solution is to have a dedicated high speed Harddrive with a defragmented Page File set to 4095 MB for both the Initial size and Maximum size.