Adding a 2gb swap file
cd /usr/local/swap
mkfile 2G swapfile.0
swap -a /usr/local/swap/swapfile.0
Deleting a swap file
swap -d <swapfilename>
Making sure a swap file doesnt get lost after a reboot
Add line as follows to /etc/vfstab
/usr/local/swap/swapfile.0 - swap - no -
that’ll make it use the extra swap file when the system reboots