Difference between revisions of "Swap"

From WA2IAC Wiki
Jump to: navigation, search
m (Swap? You should have some.)
m (What is swap space, and why use it?)
Line 10: Line 10:
 
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].
 
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? ===
  
 
The Ubuntu 12.04 LTS AMI, which I also started with, is configured with no swap space initially, as the size and number of your storage devices can vary. But most come with a large free ephemeral storage device automatically. Since S3 storage is limited by cost, the ephemeral drive is a good place for a swap file. Mine has the same device name mentioned in the question, /dev/xvdb, but you can configure this during instance launch.
 
The Ubuntu 12.04 LTS AMI, which I also started with, is configured with no swap space initially, as the size and number of your storage devices can vary. But most come with a large free ephemeral storage device automatically. Since S3 storage is limited by cost, the ephemeral drive is a good place for a swap file. Mine has the same device name mentioned in the question, /dev/xvdb, but you can configure this during instance launch.

Revision as of 20:15, 3 March 2015