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

Linux 5.1 Improvements

  • Linux 5.1 Kernel Bringing New Option For Drivers To Be Async Probed
    This driver_async_probe option added by Intel Linux developers allows specifying a list of drivers for the given system that can be probed asynchronously. While the Linux kernel has supported asynchronous driver probing during boot time, some drivers still don't behave properly in this context. As a result, using driver_async_probe= is a safe route for specifying drivers that can be probed asynchronously or for easily testing drivers to verify their async behavior.
  • Linux 5.1 To Deal With More Quirky Hardware From The Lenovo X1 Tablet To ASUS Transbook
    There's no shortage of quirky HID hardware out there. With the upcoming Linux 5.1 kernel cycle will be more fixes/workarounds for such consumer devices.

Android Leftovers

Samsung 970 EVO Plus 500GB NVMe Linux SSD Benchmarks

Announced at the end of January was the Samsung 970 EVO Plus as the first consumer-grade solid-state drive with 96-layer 3D NAND memory. The Samsung 970 EVO NVMe SSDs are now shipping and in this review are the first Linux benchmarks of these new SSDs in the form of the Samsung 970 EVO Plus 500GB MZ-V7S500B/AM compared to several other SSDs on Linux. The Samsung 970 EVO Plus uses the same Phoenix controller as in their existing SSDs but the big upgrade with the EVO Plus is the shift to the 96-layer 3D NAND memory. Available now through Internet retailers are the 250GB / 500GB / 1TB versions of the 970 EVO Plus at a new low of just $130 USD for the 500GB model or $250 USD for the 1TB version. A 2GB model is expected to ship this spring. Read more

elementary 5 "Juno"

In the spring of 2014 (nearly five years ago), I was preparing a regular presentation I give most years—where I look at the bad side (and the good side) of the greater Linux world. As I had done in years prior, I was preparing a graph showing the market share of various Linux distributions changing over time. But, this year, something was different. In the span of less than two years, a tiny little Linux distro came out of nowhere to become one of the most watched and talked about systems available. In the blink of an eye, it went from nothing to passing several grand-daddies of Linux flavors that had been around for decades. This was elementary. Needless to say, it caught my attention. Read more