notiz:pm-hibernation-image-allocation-is-97054-pages-short
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen der Seite angezeigt.
| Beide Seiten, vorherige ÜberarbeitungVorherige Überarbeitung | |||
| notiz:pm-hibernation-image-allocation-is-97054-pages-short [2023/07/10 23:48] – gelöscht - Externe Bearbeitung (Unknown date) 127.0.0.1 | notiz:pm-hibernation-image-allocation-is-97054-pages-short [2023/07/10 23:48] (aktuell) – ↷ Seitename wurde von notiz:hibenate-memory-management auf notiz:pm-hibernation-image-allocation-is-97054-pages-short geändert clerie | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | ====== PM: hibernation: | ||
| + | I encountered an issue where hibernation on a freshly booted system works, but after a while it failed and the system just came up again. | ||
| + | I checked dmegs and found the following messages. | ||
| + | |||
| + | < | ||
| + | [Di Jul 11 06:07:02 2023] PM: hibernation: | ||
| + | [Di Jul 11 06:07:02 2023] Filesystems sync: 0.011 seconds | ||
| + | [Di Jul 11 06:07:02 2023] Freezing user space processes | ||
| + | [Di Jul 11 06:07:02 2023] Freezing user space processes completed (elapsed 0.003 seconds) | ||
| + | [Di Jul 11 06:07:02 2023] OOM killer disabled. | ||
| + | [Di Jul 11 06:07:02 2023] PM: hibernation: | ||
| + | [Di Jul 11 06:07:02 2023] PM: hibernation: | ||
| + | [Di Jul 11 06:07:02 2023] PM: hibernation: | ||
| + | [Di Jul 11 06:07:02 2023] PM: hibernation: | ||
| + | [Di Jul 11 06:07:02 2023] PM: hibernation: | ||
| + | [Di Jul 11 06:07:02 2023] PM: hibernation: | ||
| + | [Di Jul 11 06:07:02 2023] PM: hibernation: | ||
| + | [Di Jul 11 06:07:02 2023] PM: hibernation: | ||
| + | [Di Jul 11 06:07:02 2023] PM: hibernation: | ||
| + | [Di Jul 11 06:07:03 2023] PM: hibernation: | ||
| + | [Di Jul 11 06:07:03 2023] PM: hibernation: | ||
| + | [Di Jul 11 06:07:03 2023] OOM killer enabled. | ||
| + | [Di Jul 11 06:07:03 2023] Restarting tasks ... done. | ||
| + | [Di Jul 11 06:07:03 2023] PM: hibernation: | ||
| + | </ | ||
| + | |||
| + | A similar situation got described in the [[https:// | ||
| + | |||
| + | > The freezing of devices is carried out after enough memory has been freed (at the time of this writing the image creation requires at least 50% of system RAM to be free) | ||
| + | |||
| + | So I checked with my system and yes, more than 50% of RAM got allocated. | ||
| + | I wondered why this doesn' | ||
| + | |||
| + | Because all of my systems have enough RAM for their intended use, I tuned swap allocation to a minimum and have set: | ||
| + | |||
| + | <code bash> | ||
| + | sysctl vm.swappiness=0 | ||
| + | </ | ||
| + | |||
| + | Which is literally a " | ||
| + | It is okay, because hibernate can still use the swap as a storage, but it does not get used to out source stuff that usually belongs into RAM. | ||
| + | When there is enough free RAM for hibernation, | ||
| + | When there is not, hibernate usually tries to free some memory in RAM and temporarily moves it to swap to it can pack it's resume image. | ||
| + | But unfortunately this is not allowed due to swappiness being set to 0. | ||
| + | |||
| + | As a result, setting swappiness to 1 fixes it, because we still deny usage of swap, but allow it for cases where absolutely no other option exist. | ||
| + | |||
| + | <code bash> | ||
| + | sysctl vm.swappiness=1 | ||
| + | </ | ||
