https://docs.rackspace.com/support/how-to/create-remove-swap-file-in-ubuntu/
//changes on this line only
sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 oflag=append conv=notrunc
The above command will append 1GiB of zero bytes at the end of your swap file.