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 Fedora: EPEL, Fedora Program Management, Fedora 30 Plans and Bodhi 3.13.0 Release Roy Schestowitz 16/02/2019 - 3:15am
Story Events: SFK, OSCAL and FOSDEM Roy Schestowitz 16/02/2019 - 3:03am
Story Programming: Emacs Org, ISO C++, PyCharm and Recursive Programming Roy Schestowitz 15/02/2019 - 7:09pm
Story Graphics: Mesa/Virgl3D, Nouveaum and Gallium3D Roy Schestowitz 15/02/2019 - 7:06pm
Story Linux 5.1 Improvements Roy Schestowitz 15/02/2019 - 6:54pm
Story Android Leftovers Rianne Schestowitz 15/02/2019 - 6:40pm
Story Samsung 970 EVO Plus 500GB NVMe Linux SSD Benchmarks Rianne Schestowitz 15/02/2019 - 6:26pm
Story elementary 5 "Juno" Rianne Schestowitz 15/02/2019 - 6:21pm
Story Audiophile Linux Promises Aural Nirvana Rianne Schestowitz 15/02/2019 - 6:17pm
Story Ubuntu 18.04.2 LTS Released with Linux Kernel 4.18 from Ubuntu 18.10, More Rianne Schestowitz 2 15/02/2019 - 6:16pm