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 today's howtos Roy Schestowitz 22/04/2019 - 7:29am
Story Thunderbolt Is Seeing A Lot Of Improvements For Linux 5.2 Roy Schestowitz 22/04/2019 - 7:21am
Story Netrunner Rolling 2019.04 released Roy Schestowitz 3 22/04/2019 - 7:19am
Story KMyMoney 5.0.4 released Roy Schestowitz 22/04/2019 - 7:12am
Story Excellent Utilities: lnav – the log file navigator Roy Schestowitz 22/04/2019 - 7:03am
Story Android Leftovers Rianne Schestowitz 22/04/2019 - 6:35am
Story Today in Techrights Roy Schestowitz 22/04/2019 - 4:33am
Story SuperTuxKart 1.0 Release Roy Schestowitz 2 22/04/2019 - 1:54am
Story Video/Audio: Manjaro 18.0 Deepin Edition, Open Source Security Podcast, This Week in Linux, Linux Gaming News Punch, Linux Action News, GNU World Order and Talk Python to Me Roy Schestowitz 22/04/2019 - 1:42am
Story Programming: epub, OpenJDK, GNU Parallel and GStreamer Roy Schestowitz 22/04/2019 - 1:40am