Adding a swap partition: advice / data?

Posted February 28, 2014 3k views
I'm running a CentOS 6.5 droplet, and am wondering if I should add a swap partition. I know just enough about this stuff to think that the answer is "well, of course", but I don't really have a foundation for going beyond that. Will my system just die the first time it gets seriously loaded up with users and memory demands? Will swap save me from that, but only by imposing an unpleasant performance hit? Any advice in this area would be greatly appreciated.

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
1 answer
See to setup your swap file.

Since DO uses SSD disk drives you don't take near as big hit when swap is actually being used.
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 CentOS 6