The swap file, pagefile.sys, allows you to make up for a lack of physical memory and it is automatically created on the partition where your operating system is installed. By default this file is of a variable size and it always changing depending on the physical memories needs. This process takes longer then physical memory as the hard drives are not as fast (15000 rev/min) as the memory (RAM). It is therefore recommended to provide a swap file of sufficient size and location.
Microsoft bases the size of their swap file on the following formula:
1.5 * RAM = Size of the swap file (pagefile.sys)
For example if you have 128MB of RAM, then you will have a swap file of: 128 * 1.5 = 192MB
This formula is used if you have less then 2GB of RAM (yes, I said 2GB). If you have 2GB of Ram or more then it won’t increase your swap file to more then this, it will be fixed at 2GB. If you want to have a swap file that is bigger then this then you should know that the limit imposed by Windows is 4GB.
The swap file is indispensable for the correct functioning of Windows, even if you have more then 512MB of memory. Avoid deleting this file or reducing its size.
Note:
If you have multiple hard disks then it is recommended that you put your swap file on one of the drives other then that of the operating system, this allows you to increase your performance.
Definition:
RAM = physical memory = living memory
Swap = swap file = virtual memory = pagefile.sys