Adding swap space on Linux
A safety buffer when memory runs short.
Swap lets the system use disk space when memory is full, so programs slow down instead of being killed.
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile none swap sw 0 0' >> /etc/fstab
free -hSwap is a buffer, not extra memory. If the server uses swap all the time, it needs more RAM; see Requesting an add-on.