On Mon, Feb 10, 2020 at 4:33 AM Chris Murphy <lists@colorremedies.com> wrote:
- A swap device sized at 1:1 with RAM, and any appreciable use of
swap, will thwart the creation of a hibernation image. This is
discovered at hibernation image creation time.

- A swap device sized at 2:1 with RAM might be quite a lot more
reliable, but it's still not a guarantee. And already the swap
partition is considered too big.[2]

Actually, as I learned recently, you can't hibernate if you use occupy than 50% of total memory, it will fail with "can't allocate memory" error. The reason, at least what I found out, is that the kernel first copies the whole memory into your memory (ouch), before writing it to the swap partition. So if you have 16 GB RAM, you can't hibernate if you use more than 8 GB, and therefore an 8 GB swap partition (fully unoccupied) is enough for you. I have tested this multiple times, it works for me exactly as written. So, actually, a swap device sized 1:1 with RAM is already an overkill (unless you use more than 50% of swap size with just regular usage), and 0.5:1 ratio would be perfectly fine if you made sure that swap got used just for hibernation.