Adding extra swap to a Linux system
Adding extra Swap Space
Add Swap Space
Small compute instances with limited memory can slow things down and overload the CPU. You want to add 2x of your available RAM in swap space in my case, this is 1.2GB of swap for 600MB of RAM. Create your swap file:
Change permissions to only allow root access:
Set up a Linux swap area on the file:
Make sure the changes are permanent by modifying the filesystem table:
Append /swapfile swap swap defaults 0 0
to the end of the file. It should look like this:
Last updated