Debian Stretch's way of hibernating/resuming (via systemctl hibernate) is quite unusual:
first, swap out what can be swapped out
then, store the rest (kernel and non-swappable parts of user memory) as hibernation image.
This is extremely annoying, as the system is laggy to unresponsive a very long time (10-20 minutes) until the most important of the dozens of gigabytes of swapped-out stuff has been swapped in again.
If possible, I would like to configure hibernate/resume so that the first step (swap out what can be swapped out) is omitted and instead just the whole memory is being written to the hibernation file, and read back in one piece when resuming.
This would have the advantage of the computer being fully usable directly after resuming, without constantly having to wait at an unresponsive computer each time some thread is being swapped in again.
Any idea if, and how the hibernation/resume can be configured this way?
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Stretch: How to configure systemctl hibernate correctly?
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 133 times
Re: Stretch: How to configure systemctl hibernate correctly?
Not sure about disabling the swapping out stage but you could try to minimise the hibernation image, which should make resuming faster:
Reference: https://www.kernel.org/doc/Documentatio ... erface.txt
If that helps then make it permanent by either adding the command to /etc/rc.local or with systemd-tmpfiles (not sure if that works with stretch's systemd version though).
Code: Select all
# echo 0 > /sys/power/image_size
If that helps then make it permanent by either adding the command to /etc/rc.local or with systemd-tmpfiles (not sure if that works with stretch's systemd version though).
deadbang
Re: Stretch: How to configure systemctl hibernate correctly?
Thank you very much, @HeadOnAStick
I looked at the /sys/power/image_size and it showed 20 gigabytes.
That might explain why always 20 GB is being stored in the hibernation file, no matter how much memory is actually used (normally around 30, 40GB).
Looks like changing that setting to the actual memory size (48GB) might improve the situation!
I will try it out when I can afford a reboot tonight or tomorrow, and report back
I looked at the /sys/power/image_size and it showed 20 gigabytes.
That might explain why always 20 GB is being stored in the hibernation file, no matter how much memory is actually used (normally around 30, 40GB).
Looks like changing that setting to the actual memory size (48GB) might improve the situation!
I will try it out when I can afford a reboot tonight or tomorrow, and report back