Posted on Monday 2nd March 2020
Swapfiles work as secondary memory when allocated ram is exhausted, Swap should never be less that 32MB.
Create a Swap File using the dd command (128M block size X 32 = 4GB SwapFile)
 sudo dd if=/dev/zero of=/swapfile bs=128M count=32
Set Permissions on the SwapFile
 sudo chmod 600 /swapfile
Make Swap Area
 sudo mkswap /swapfile
Enable Swapfile
 sudo swapon /swapfile
Confirm Enabled
 sudo swapon -s
Add Swapfile to fstab to enable mount on boot
 sudo vi /etc/fstab
Append the following line
/swapfile swap swap defaults 0 0