Your Question: What Is Swap Size in Linux?
Contents

Swap space in Linux is used when the amount of physical memory (RAM) is full. If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space. … Swap space is located on hard drives, which have a slower access time than physical memory.

How do you define swap size?

It suggests swap size to be:

  1. Twice the size of RAM if RAM is less than 2 GB.
  2. Size of RAM + 2 GB if RAM size is more than 2 GB i.e. 5GB of swap for 3GB of RAM.

What is a good swap size?

5 GB is a good rule of thumb that will ensure you can actually hibernate your system. That should usually be more than enough swap space, too. If you have a large amount of RAM — 16 GB or so — and you don’t need hibernate but do need disk space, you could probably get away with a small 2 GB swap partition.

Alexander Ross

Alexander Ross

Gaming, Esports & Interactive Media Writer

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.

Share this article
Twitter Facebook Pinterest