Windows XP by default uses a System managed paging file that works well and it is highly recommended to leave it alone.
"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."
- RAM, Virtual Memory, Pagefile and all that stuff
Default - Windows XP will automatically set the paging file to the following size based on how much RAM is in your system.
Less than 1GB of RAM
- 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 (32-bit PF Size Limit = 4095 MB)
More than or equal to 1GB of RAM
- Initial size (MB): 1 x the amount of RAM in your system
- Maximum size (MB): 3.0 x the amount of RAM in your system (32-bit PF Size Limit = 4095 MB)
- What is the Page File for anyway? (Microsoft Performance Team)
Notes - A properly configured paging file will not resize (increase) so long as the Initial size is set large enough and you have not run out of available RAM. Allowing the paging 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 paging 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 than setting it too small. All arguments about setting the paging file smaller are to conserve disk space and have nothing to do with performance. A permanent solution to this 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 than the "Physical Memory - Total" your system could benefit from adding more RAM. When you change the amount of RAM in your system with a System managed paging file, Windows XP will automatically adjust the paging file size for you.
Optimization - If you have more than one Hard drive in your computer you can create a second paging file on the other physical Hard drive, which will increase paging file performance. Windows uses an internal algorithm to determine which paging file to use for optimal virtual memory management.