I use LVM volumes for my swap space, which is yet another option, one
that can be grown and shrunk easily, online.
You can resize a logical volume online, but AFAIK you cannot resize a swap
area online (while in use) ;
Indeed, in the general case you'll need to do it like:
lvcreate --name tmpswap --size NNg <VG>
mkswap /dev/<VG>/tmpswap
swapon /dev/<VG>/tmpswap
swapoff /dev/<VG>/swap
lvresize --size +2g /dev/<VG>/swap
mkswap /dev/<VG>/swap
swapon /dev/<VG>/swap
swapoff /dev/<VG>/tmpswap
lvremove /dev/<VG>/tmpswap