# Turn of swap sudo dphys-swapfile swapoff # Edit the swap file sudo nano /etc/dphys-swapfile # Change the property # CONF_SWAPSIZE= SIZE CONF_SWAPSIZE= 2048 # 2 GB # Update value sudo dphys-swapfile setup # Turn on swap sudo dphys-swapfile swapon # Reboot system so all programs can use swap sudo reboot