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


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.
-
- Login or register to post comments
Printer-friendly version
- 1718 reads
PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
Security Leftovers
| today's howtos
|
HTTP Vs. HTTPS
The internet runs on protocols. Rules and norm defined so that there is some form of standardization. One such protocol is the HyperText Transfer Protocol(HTTP).
| 5 of the Best Linux Distros for Developers and Programmers
One of the reasons Linux is great is because of how flexible it is. For example, it can run on everything from servers to your old laptop to a Raspberry Pi. For this reason, it’s also a fantastic platform for developers.
Whether you’re a seasoned developer or just using Linux to learn to program, you still have to choose a distribution. You could just choose Ubuntu and run with it, but there are plenty of “other options available to you.”
|
Recent comments
1 hour 21 min ago
1 hour 28 min ago
2 hours 11 min ago
2 hours 17 min ago
3 hours 17 min ago
3 hours 19 min ago
13 hours 3 min ago
13 hours 6 min ago
14 hours 13 min ago
15 hours 1 min ago