[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#987503: swap partition only 1 GB instead of at least 1 x RAM size



Hi,

On Wed, 14 Sep 2022 12:29:13 +0200 Pascal Hambourg <pascal@plouf.fr.eu.org> wrote:
> Sorry to insist, but IMO this issue should really be worked out. I once
> suggested the following simple formula :
> 
>      max swap size = min(RAM size, disk space * R)
> 
> with R being a ratio between 0 and 100% to be defined.
> 
> For example with R=5%, the swap size would be limited to either the RAM size
> or 5% of available disk space, whichever is lower.
> 
> Doesn't that sound reasonable for most setups, at least more than the current
> formula ?

the default partitioning scheme now has made hibernation impossible for three
whole stable releases. I have no experience in writing d-i code but just so
that *something* happens I submitted this merge request to partman-auto:

https://salsa.debian.org/installer-team/partman-auto/-/merge_requests/12

This MR keeps the partman-auto/cap-ram setting because it has now been in
partman-auto for so long that likely other users of d-i have started depending
on its existence. Instead, I raised the limit imposed by partman-auto/cap-ram
while at the same time adding a new setting I called partman-auto/perc-ram
which (if I'm reading the code correctly) should cap the swap size at X percent
of the remaining free disk space. This way, d-i should continue to work even in
situations where there is more RAM than disk space for which commit 7966fcd was
designed in the first place.

This is a draft MR because it is untested. Maybe somebody could help and review
and test it.

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature


Reply to: