Re:Ask HN: Why is the Linux community struggling to implemen...
by Kliment on Thursday April 08, 2021 @06:21PM
(#26744561)
The memory contents have to go somewhere. They can't stay in RAM as RAM will be powered off. If there's sufficient free swap space they go there. If there isn't, the current swap and memory contents get compressed and it then goes to swap. If there's still not enough space, hibernation will fail. So if your swap is filled with incompressible data to its full capacity, you will not be able to hibernate. This is very unlikely if your swap is enormous, but it can happen.
Re:Ask HN: Why is the Linux community struggling to implemen...
by herodoturtle on Thursday April 08, 2021 @08:01PM
(#26745272)
That's for taking the time to explain - makes perfect sense - cheers.
Re:Ask HN: Why is the Linux community struggling to implemen...
by lvs on Thursday April 08, 2021 @10:22PM
(#26746064)
This seems like a bug because it means system state results in unpredictable behavior. There should be a dedicated swap for hibernation, like the pre-allocated hiberfile used by Windows.
Re:Ask HN: Why is the Linux community struggling to implemen...
by eyeinthepyramid on Friday April 09, 2021 @01:09AM
(#26746935)
you can set it up that way if you prefer, there is a resume= kernel param you can set to a separate file or device. I keep them combined tho because I hardly ever use much swap, and don't have a ton of disk, and if hibernation ever did fail, I can just close some tabs and be fine
Re:Ask HN: Why is the Linux community struggling to implemen...
by creese on Thursday April 08, 2021 @07:58PM
(#26745246)
Make the swap partition equal to 1.5 times your RAM. That's always worked for me.
Re:Ask HN: Why is the Linux community struggling to implemen...
by RealStickman_ on Thursday April 08, 2021 @05:02PM
(#26743709)
Everything in RAM and Swap will be compressed when you want to hibernate.
> You need a swap configuration that's large enough to fit your entire RAM and also your current swap.
I'm struggling to wrap my head around this one - please help me understand?
How can a swap be made large enough to fit your entire RAM as well as your current swap?
In other words, what if your current swap is already being used near capacity?
Or is that not really likely with a really large swap?