All computers only have a finite amount of memory. For example a modern PCs might have 4GB of RAM. If one loads the operating system, and a few applications into this memory the memory qill quickly become full.
Nearly all modern operating systems allow for this by using a section of the hard drive as an extension of the RAM. In other words when RAM, the operating system can store data that would otherwise be stored in RAM on the hard drive.
Alternatively referred to as a page file or paging file, a swap file is a file stored on the computer hard drive that is used as the temporary location to store the information that is not currently being used by the computer RAM.
It is perfectly normal for the swap file or page file to grow in size, sometimes growing several hundred megs in size. Below is a listing of common Microsoft operating system swap file information; however, it is important to realize that this information may vary. By default the swap files are hidden.
Some examples of swap files:
Windows NT, 2000, XP, Vista, and 7 - C:\PAGEFILE.SYS
Windows 95, 98, and ME - C:\WIN386.SWP
Windows 3.x C:\WNDOWS\386PART.PAR
To facilitate copying virtual memory into real memory, the operating system divides virtual memory into pages, each of which contains a fixed amount of data. Each page is stored on the hard disk until it is needed. When the page is needed, the operating system copies it from hard disk into main memory.
The process of copying these virtual pages from the hard disk disk to main memory is known as paging or swapping.
The read/write speed of a hard drive is much slower than RAM, and the technology of a hard drive is not geared toward accessing small pieces of data at a time. If your system has to rely too heavily on virtual memory, you will notice a significant performance drop. The key is to have enough RAM to handle everything you tend to work on simultaneously -- then, the only time you "feel" the slowness of virtual memory is when there's a slight pause when you're changing tasks. When that's the case, virtual memory is perfect.
When it is not the case, the operating system has to constantly swap information back and forth between RAM and the hard disk. This is called thrashing, and it can make your computer feel incredibly slow.
[1] Webopedia, What is virtual memory? (n.d.) (Online) Available at: http://www.webopedia.com/TERM/V/virtual_memory.html (Accessed 14/06/2013)
[2] J. Tyson, How virtual memory works, (n.d.) (Online) Available at: http://computer.howstuffworks.com/virtual-memory.htm (Accessed 14/06/2013)
[3] How Stuff Works, Memory Management (n.d.) (Online Image) Available at: http://www.techjunctionplace.com/2012/10/virtual-memory.html (Accessed 14/06/2013)
[4] Computer Hope, Swap File (n.d.) (Online) Available at: http://www.computerhope.com/jargon/s/swapfile.htm (Accessed 14/06/2013)