how to add swap space easily on

1) Create a swapfile made of many many 0's, in the size of how large a swapfile you want, so e.g. for 16gb:
$ dd if=/dev/zero of=~/.swapfile bs=1m count =16384

2) Add it as swap:
# swapctl -a ~/.swapfile

3) For great success, check it out to get warm fuzzy feelings:

$ swapctl -l
Device 512-blocks Used Avail Capacity Priority
/dev/sd2b 17065992 0 17065992 0% 0
/home/puffy/.swapfile 33554432 0 33554432 0% 0
Total 50620424 0 50620424 0%
0

If you have a fediverse account, you can quote this note from your own instance. Search https://exquisite.social/users/rqm/statuses/116229976835071415 on your instance and quote it. (Note that quoting is not supported in Mastodon.)