3 ms·
This was a fascinating comment to read - thanks for the insight. > You need a swap configuration that's large enough to fit your entire RAM and also your curre
by herodoturtle 6y ago
This was a fascinating comment to read - thanks for the insight.
> 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?
- RealStickman_ 6y agoEverything in RAM and Swap will be compressed when you want to hibernate.
- Kliment 6y agoThe 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.
- herodoturtle 6y agoThat's for taking the time to explain - makes perfect sense - cheers.
- lvs 6y agoThis 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.
- eyeinthepyramid 6y agoyou 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
- creese 6y agoMake the swap partition equal to 1.5 times your RAM. That's always worked for me.