swapon --showCheck free memory and disk
df -h
Enable swap
# Make swap off if exsited
swapoff -a
# Resize the swapfile (increase or decrease). Here let us increase to 2GB (assuming existing one has 1GB space as given in the article)
dd if=/dev/zero of=/var/swapfile bs=1024k count=4000
# 256 Mb
#dd if=/dev/zero of=/var/swapfile bs=512k count=500
# Make swapfile usable
mkswap /var/swapfile
# Make swapon
swapon /var/swapfile
# change permission to 0600
chmod 0600 /var/swapfile
# Verify the swapfile
swapon -show
# Make swap file permanent***
echo '/var/swapfile none swap sw 0 0' | tee -a /etc/fstab