Language Selection

English French German Italian Portuguese Spanish

What's the right amount of swap space for a modern Linux system?

Filed under
Linux
HowTos

Many years ago, the rule of thumb for the amount of swap space that should be allocated was 2X the amount of RAM installed in the computer. Of course that was when a typical computer's RAM was measured in KB or MB. So if a computer had 64KB of RAM, a swap partition of 128KB would be an optimum size.
This took into account the fact that RAM memory sizes were typically quite small, and allocating more than 2X RAM for swap space did not improve performance. With more than twice RAM for swap, most systems spent more time thrashing than performing useful work.

RAM memory has become quite inexpensive and many computers now have RAM in the tens of gigabytes. Most of my newer computers have at least 4GB or 8GB of RAM, two have 32GB, and my main workstation has 64GB. When dealing with computers with huge amounts of RAM, the limiting performance factor for swap space is far lower than the 2X multiplier. As a consequence, recommended swap space is considered a function of system memory workload, not system memory.

Read more

More in Tux Machines

Type Title Author Replies Last Postsort icon
Story Android Leftovers Rianne Schestowitz 26/06/2019 - 7:54am
Story Games: Steam Summer Sale, Last Moon, Ubuntu-Valve-Canonical Faceoff Roy Schestowitz 1 26/06/2019 - 7:49am
Story 4 open source Android apps for writers Rianne Schestowitz 26/06/2019 - 7:40am
Story How a trip to China inspired Endless OS and teaching kids to hack Rianne Schestowitz 26/06/2019 - 7:37am
Story AMD Releases Firmware Update To Address SEV Vulnerability Rianne Schestowitz 26/06/2019 - 7:29am
Story today's howtos and programming bits Roy Schestowitz 26/06/2019 - 2:55am
Story VIdeo/Audio: Linux in the Ham Shack, How to install OpenMandriva Lx 4.0 and "Debian Package of the Day" Roy Schestowitz 26/06/2019 - 2:52am
Story Hey advertisers, track THIS Roy Schestowitz 26/06/2019 - 2:27am
Story Richard Stallman: Drop the journalism charges against Julian Assange Roy Schestowitz 26/06/2019 - 2:22am
Story Rugged, Arm-based 7-inch touch-panel supports PoE and CAN Roy Schestowitz 26/06/2019 - 2:17am