Question: What Is Linux Swap?
Contents

Create a Linux Swap File.

Swap is a space on a disk that is used when the amount of physical RAM memory is full.

When a Linux system runs out of RAM, inactive pages are moved from the RAM to the swap space.

Swap space can take the form of either a dedicated swap partition or a swap file.

How does Linux swap work?

Linux uses swap space to increase the amount of virtual memory available to a host. It can use one or more dedicated swap partitions or a swap file on a regular filesystem or logical volume. There are two basic types of memory in a typical computer.

Is swap needed Linux?

Swap does not change the amount of RAM required for a healthy server, or desktop for that matter. It’s designed to be complimentary to performance on healthy systems. To summarize: — Even if there is still available RAM, the Linux Kernel will move memory pages which are hardly ever used into swap space.

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest