Swap file


The operating system of each computer manages a storage area in which the data needed by the computer just be stored. This area is called RAM (Random Access Memory). In certain situations, it may, depending on the amount of RAM possible that not all find this data in RAM space, perhaps because most memory-intensive programs are used. In this case, the addressable system memory is expanded and redirected this additional address space into a swap file.

However, some programs or operating systems such as Microsoft Windows and then access to the swap file if you have enough RAM. For example, a program of the allocated memory will be redirected to the page file when it is minimized by the user under certain versions of Windows. This more RAM for programs currently active becomes available.

Access to the additional memory paging file is for technical reasons much slower than direct access to the RAM. Hence it is depending on the speed of the mass storage medium used to speed penalty when larger amounts of data to be read from the paging file or written to the swap file. The higher the transmission rate and in particular the lower the access time of the mass storage medium, the lower the expected speed losses.

Depending on whether the memory management pure segmentation and pure paging within the framework of a virtual memory management or a combination of both uses, contains the paging file segments, memory pages, or both. The memory, the swap file and possibly mapped secondary memory pages (paging) together form the occupied part of virtual memory.


The term swap file is marked mainly by the operating system Microsoft Windows. This manages the paging file automatically and adjusts dynamically to the requirements. If more space is required for the execution of a process, the swap file is larger; is later less space needed, it is reduced. It is also possible to set the swap file to an arbitrary fixed size (from 2 MB), which can possibly lead to a performance gain. A distinction between the physical RAM and the paging file will not take place from the perspective of applications. The applications use virtual memory completely transparent. Under Windows 2000, XP, Vista and 7 is called the swap file pagefile.sys. This name can be changed in the registry database. It is also possible to disable the paging file, but this is only useful when the physical memory is never fully used.

ReadyBoost is a Microsoft introduced in Windows Vista technology, which allows for a fast flash memory (eg USB stick ) files (so that, among other things, the swap file) to cache and thereby speed up the access.


Other operating systems, such as Linux, use similar memory management mechanisms, but instead of the pagefile usually a dedicated partition, called the swap partition. This can also be located on a separate storage device. The use of a partition instead of a swap file has the advantage that no fragmentation can occur. A disadvantage is the fixed size of the partition and thus also of the available memory. Under Linux, it is possible to add more swap partitions during operation or remove existing ones. Moreover, also regular files can be used to check out, but here it must be the file size. The swap space can also be used as temporary storage during the rest state.