How to increase swap space

If it looks like I am short on swap space is there any simple way to change partition sizes to create a bigger swap partition? Are there any other solutions available?
 
So if I create a /usr/swap0 file, is this a replacement for my swap partition, or an extension to it?
 
Just out of interest, if I can create a swapfile whenever I want, is there any need for a swap partition?

Is one more efficient than the other?
 
Sure a partition is more efficient, for swapping, abstractions of a filesystem are unnecessary. Also, a swap file can cause issues with filesystems that dynamically allocate memory for operations (like ZFS)
 
Back
Top