How to set swap space for Linux
Recently, I found the memory of my VPS is not enough. So I decide to set a swap space for this VPS to share stress of memory usage.
How to set
Log into your server as root.
1 | sudo swapon --show # check current status of swap |
1 | /swapfile none swap sw 0 0 |
1 | mount -a # if output is nothing, your fstab works fine. |