A swap file is a file that contains data retrieved from system memory, or RAM. By transferring data from RAM to a secondary storage device in the form of a swap file, a computer is able to free up memory for other programs.
Swap files are a type of virtual memory, since they are not stored in physical RAM. They extend the amount of available memory a computer can access by swapping memory used by idle processes from RAM to a swap file. This action is also called "paging" and is a common type of memory management. When swapped memory is needed by a program, the data from the swap file is paged back into physical memory.
While swap files are a convenient way to increase the amount of available system memory, they can also decrease system performance. For instance, if a computer is using nearly all of its physical memory, the system may need to frequently swap data between RAM and swap files. Since reading data from a secondary storage device (such as an HDD or SSD) is much slower than accessing RAM, repeatedly swapping memory may cause noticeable delays.
Swap files are automatically created, accessed, and deleted by the operating system, which means you don't have to worry about maintaining them. However, if you notice your computer is slowing down when you switch between programs, it may indicate your computer is running low on system memory and is frequently swapping memory. You can temporarily alleviate this problem by closing unused programs. The best long term solution is to add more RAM.
File extension: .SWP