24/7/365 Support

Debian swap partition

If available, a swap file or partition is used by Linux when memory paging to disk is necessary. With the advent of cheap memory, such paging is often infrequent with one exception: system hibernation. This is where the system is paused and the memory contents are written to disk prior to power off in order to allow the system to resume from the saved state. While this is commonly associated with laptop systems, servers sometimes make use of it as well.

Swap files are single files created within an existing filesystem, while swap partitions are exactly that -a specially formatted disk partition. In general, swap files are only used when additional swap space is necessary for some reason, as it has all the additional overhead (metadata, journaling, allocation, and such) of the filesystem in which it resides.

Unless an administrator is absolutely certain a system will never need to swap to disk or require the ability to hibernate, a swap partition equal in size to the installed memory is recommended.

Solid-state drives (SSD), so-called flash drives, were once considered . an exception. In that the limited write cycles were considered a problem if swap files were placed on such a drive. However, with modem flash technology, this is no longer an issue, especially since the swapping has been greatly reduced by the large amounts of memory in current systems.

Help Category:

What Our Clients Say