When installing Ubuntu unless you do a manual partition, you get roughly and x+.5 MB swap space, where x is the amount of ram present. At least this has been my experience. I that official Ubuntu documentation (https://help.ubuntu.com/community/SwapFaq) recommends having 2x ram for the swap partition and indicates that x is the minimum why aren't we defaulting to larger swap sizes, especially considering the relatively low expense of storage?
swap size=double the RAM size, is only applicable for the RAM sizes(1GB or 2GB).For higher RAM sizes(probably 8GB or 16GB) you don't need to create a swap space or minimum swap space of 2GB is enough.
Relatively low price of storage? Pfft. I have 24GB of RAM and 120GB of SSD. I'd strongly mind if I lost 48GB of SSD to swap.
This question deals with the high-RAM views in the industry. Basically, if you have tons of RAM, it's unlikely you're going to need tons of swap unless you're dealing with very specific workloads that could force things into swap.
RAM+.5GB simply ensures there's more than enough to push all of RAM into swap at hibernate without too much of a fight. That should cover most behaviours.
If you're on a low-RAM system, you'll probably need more.