Keeping a 1 GB VPS responsive
I run small things on the cheapest tier: one shared vCPU and a gigabyte of memory. Enough for a static site and a couple of jobs, if you are deliberate.
fallocate -l 512M /swapfile
chmod 600 /swapfile && mkswap /swapfile && swapon /swapfileA small swap file turns a hard out-of-memory kill into a slow morning I can notice and fix.