Difference between revisions of "Swap"

From WA2IAC Wiki
Jump to: navigation, search
m (How can I set up a swap space on my ephemeral storage drive?)
m (Swap? You should have some.)
Line 1: Line 1:
 
Can you run Linux without swap space? Yes. Should you. I would say "no". Why? I'd rather not argue the topic. Do the research yourself. Or, learn the hard way. Here is some cookbook material...
 
Can you run Linux without swap space? Yes. Should you. I would say "no". Why? I'd rather not argue the topic. Do the research yourself. Or, learn the hard way. Here is some cookbook material...
  
 +
I'll rewrite and expand this page, as it's important, and I am now learning that there is a deficit of understanding about this in the field.
  
 +
Some applications will require swap to run. Other than that, you don't need swap until you need it. If you don't have it when you need it, "bad things will happen" (TM). It will be too late then, and you'll be having a production emergency of some sort. Better to have some swap. One solution that is often favored because performance is seen as an issue is to use a ramdisk or something of the sort. However, if you've got enough memory and are in the "I don't need swap" camp, then what do you care? Set up your emergency stash of swap on disk. Just sayin'.
  
  
 
=== What is swap space, and why use it? ===
 
=== What is swap space, and why use it? ===
  
Swap space is disk space used by Linux (and most other operating systems) to store objects from memory when real physical memory starts becoming crowded. Because disk is generally slower than memory, Linux stores in swap the least recently used objects first, and keeps as much as it can in memory. It's generally recommended to have a swap space equal in size to your memory, if possible. See more details about swap space here.
+
Swap space is disk space used by Linux (and most other operating systems) to store objects from memory when real physical memory starts becoming crowded or is exhausted. Because disk is generally slower than memory, Linux stores in swap the least recently used objects first, and keeps as much as it can in memory. It's generally recommended to have a swap space equal in size to your memory, if possible. See more details about swap space [https://help.ubuntu.com/community/SwapFaq here].
 +
 
 
Where should I set this up?
 
Where should I set this up?
  

Revision as of 20:15, 3 March 2015