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

today's howtos

Shows: mintCast 307 and LINUX Unplugged 298

  • mintCast 307 – Encryption Part 1
    This is Leo and with me I have Joe, Moss, and the return of Rob for this episode! We’re recording on Sunday April 21st 2019. First up, in our Wanderings, I talk Kernel 5.0 and transfer speed, Joe reformats and loses Windows but gains NVidia peace of mind, and finally Moss digests more distros and has some success with migrating Kodi Then, our news is filled with updates from top to bottom. In our Innards section, we dive into file and disk encryption.
  • Blame Joe | LINUX Unplugged 298
    This week we discover the good word of Xfce and admit Joe was right all along. And share our tips for making Xfce more modern. Plus a new Debian leader, the end of Scientific Linux, and behind the scenes of Librem 5 apps.

Android Leftovers

Today in Techrights