|
|
Subscribe / Log in / New account

Toward a swap abstraction layer

Toward a swap abstraction layer

Posted May 29, 2023 9:10 UTC (Mon) by kleptog (subscriber, #1183)
In reply to: Toward a swap abstraction layer by farnz
Parent article: Toward a swap abstraction layer

> The rules about swap being sized proportionally to RAM come from systems without overcommit.

And the fact that if you want to support hibernation, your memory has to fit in swap. IIRC that was the argument some distributions had to default sizing the swap so large. I think most distributions don't do that anymore, and hibernation has basically disappeared as an option in most setups.

I think it would be nice to be able to reserve some disk space for "hibernation-but-not-swap", but that's not possible AFAIK.


to post comments

Toward a swap abstraction layer

Posted May 29, 2023 12:20 UTC (Mon) by mb (subscriber, #50428) [Link] (1 responses)

> I think it would be nice to be able to reserve some disk space for "hibernation-but-not-swap", but that's not possible AFAIK.

You can do that by only enabling an additional swap partition just before hibernation and disabling it right after resume.

Toward a swap abstraction layer

Posted May 30, 2023 13:38 UTC (Tue) by gioele (subscriber, #61675) [Link]

> > I think it would be nice to be able to reserve some disk space for "hibernation-but-not-swap", but that's not possible AFAIK.
>
> You can do that by only enabling an additional swap partition just before hibernation and disabling it right after resume.

That's more or less the behavior of the `resume=` kernel argument, isn't it?

From https://man7.org/linux/man-pages/man7/kernel-command-line...

> resume=, resumeflags=
>
> Enables resume from hibernation using the specified device and mount options. All fstab(5)-like paths are supported. For details, see systemd-hibernate-resume-generator(8).


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds