DataDrake For Hibernate to work, Swap needs to be at least as big as system memory
I suspect this is the ideal situation, and it makes sense. However, isn't it true that swap needs to be large enough to store everything that's actually in RAM when hibernate is invoked?
One of my computers (my laptop) has 16 GB of RAM, but only a fraction of that is normally ever used, and hibernate works just fine on it. Similarly, my main workstation has 32 GB of RAM, and hibernate has always worked just fine on it, too. Both of these machines (actually, all of our computers) have just the default amount of swap installed by Solus installers.
I would expect hibernate to have issues if it were necessary to store all of RAM every time it were invoked, not if it were necessary to store just what's actually in RAM at that time. Or am I wrong to be using hibernate as I am?
EDIT: To be sure I wasn't mis-rembering anything about my success with hibernation, I just hibernated my laptop, to make sure. Here is my memory situation prior to hybernating:
total used free shared buff/cache available
Mem: 15Gi 2.8Gi 8.7Gi 313Mi 4.2Gi 12Gi
Swap: 3.7Gi 0B 3.7Gi
I want to make it clear that I'm not disputing @DataDrake , whom I respect. I'm simply trying to understand the hibernate procedure, as I appreciate being able to return to a session after the computer has been shut down. It occurs to me that having SWAP == RAM would only matter if the ongoing processing has used up all of existing RAM.
In the case illustrated above, my laptop was running in its eight workspaces:
- Thunderbird
- Vivaldi (including Facebook, Twitter, brokerage, online banking, and more)
- Vivaldi (this forum and ad-hoc browsing)
- AisleRiot (Spider solitaire)
- Shisen-sho
- Mahjongg
- LibreOffice (writer) and Dolphin
- Terminal
I suspect we need to make sure that we don't hibernate when our swap space is not large enough to accommodate the amount of RAM that's in use at the time, and if that's in question, we can easily find out with the command free -h
.