Move the Windows Swap File
Every computer has a limited amount of internal memory, or RAM. Operating systems, like Windows NT, Windows 2000, Windows XP and Windows Vista overcome this memory limitation by using virtual memory. The concept is to swap memory from RAM to a hard disk file when more memory is needed.
This swapping of memory to hard disk will affect the computer performance. Although swapping memory will allow for a higher memory usage, the hard disk speed will affect the Windows performance. If your Windows PC is not performing like you expect it should, you can have a look at the page file configuration.
The first thing to do to ensure Windows is fast, is to use a fast hard disk. These days most systems support SATA drives, which are the fastest available at the moment. SCSI disks are an alternative, but they are more costly, so less common for personal computer usage. Another possibility is a RAID disk configuration, which can increase the hard disk transfer rate, but does require multiple disks and is much more complex. Only Raid level 0 can potentially help improve performance, since it improves the read speed. A requirement for RAID is also that it is hardware RAID and not software RAID, otherwise it will have a negative impact on overall performance.
The actual swap file that the Windows operating systems uses to swap memory, is a single file on disk. By default this swap file is created on the same disk as the windows installation. But there are better locations for the swap file. The best PC performance is achieved if the windows swap file is on a different hard disk from the operating system. The second best is to have the swap file on a separate partition of the hard disk. This would be most applicable for laptop computers as they only one hard disk.
In both cases it is actually good to leave a small pagefile on the system disk because Windows needs that to make a memory dump in case of errors.
To change the location of the swap file in Windows XP:
- From the Windows Start menu, select Control Panel.
- In the Control Panel select Performance and Maintenance and then click System.
- In the System Properties dialog box, select the Advanced tab.
- Next, click the Settings button in the Performance group.
- In the Performance Options dialog box, select the Advanced tab.
- Now click the Change button in the Virtual memory group.
- First create a new swap file on the drive you want to use for the swap file. Make sure you specify at least the same Initial size and Maximum size as the existing swap file on the Windows installation disk.
- Click OK three times to close all dialog boxes. You will need to restart your computer to have the changes take effect. After that the swap file will be on the new drive, and you should notice the better PC performance.
- Next, remove the swap file on the Windows installation disk by selecting the drive and then selecting the No paging file radio button.
If you have multiple hard disks in your system, you can actually consider adding swap files to increase performance. Make sure to configure the swap files on different physical hard disks in that case, and make the page files on the secondary hard disks larger than on the system disk.
If you want more than 4 GB of swap file size (the Windows limit), you actually need to use multiple swap files. But it is probably better to add more RAM to your system in that case as a swap file of that size will not help your system’s performance.
As with all performance tweaks, a lot depends on your usage of the system, so make sure you test various configurations to see what works best in your case.
Microsoft has an interesting article on pagefile configuration in Windows XP.
@Vanessa – Don’t get your comment, the instructions are in the article. Try typing “sysdm.cpl” in the Start menu and open that if you cannot find the setting.
There is not a setting to change the location of the swap file in Windows XP.
Thanks for this article. It was a great help for me :)