On Mon, Feb 10, 2020 at 9:43 PM Chris Murphy <lists@colorremedies.com> wrote:
Where I came up with 2:1 is from anaconda/blivet code:
anaconda/pyanaconda/storage/utils.py:642:    :param bool hibernation:
calculate swap size big enough for hibernation
https://github.com/rhinstaller/anaconda/blob/master/pyanaconda/storage/utils.py#L654

Note on line 673 it actually could be 3x RAM, if --hibernation were
used, but this flag isn't used on Fedora Workstation so this
computation never gets used.

I  guess that's because if you search the Internets, the swap recommendations are all over the place, so some median numbers were picked :-) I had no idea about the hibernation limitation either, until the web browsers started to eat 4+GBs RAM... :-)

The problem is that you don't know how much swap the system will use during regular usage, so you don't know how much headroom you need on top of the 0.5x mem size needed for hibernation. I think nowadays a new formula could be devised, something like `swap size = 0.5x mem size + 2 GB`. I think that's plenty for regular usage (even SSDs are too slow to be used as RAM, not to mention it will wear them out quickly) and it should allow for hibernation most of the time.
 
And yet there is a 'resume=UUID' boot
parameter included. Why is this boot parameter set as if we're
supporting hibernation out of the box?

Probably because of this?
https://bugzilla.redhat.com/show_bug.cgi?id=1206936
https://github.com/rhinstaller/anaconda/pull/1360

And yes, we currently support hibernation out of the box, and it works. If you don't have SecureBoot enabled, and if you use non-GNOME or know how to call it from GNOME.