No swap space

Posted September 12, 2012 10.2k views
I'm using an ubuntu 12 installation on a Droplet. Is there a way to add a swap partition or at least set up a swap so if memory leaks over the limit it can swap to disk?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
4 answers

Please please…when we create a new droplet, have some dropdown parameter that says “swap space” so that newbies don’t get confused when their programs start dying because of lack of swap RAM!

Yes, you can use the following articles to quickly and easily add swap space:
by Etel Sverdlov
Linux swaps allow a system to harness more memory than was originally physically available. Here's how to set up a linux swap file on Ubuntu 12.04
will this work on centos 5.8? or 5.9?