On Sep 5, 2014, at 6:15 AM, Bastien Nocera <bnocera(a)redhat.com> wrote:
----- Original Message -----
>
> On Sep 4, 2014, at 6:58 AM, Matthew Miller <mattdm(a)fedoraproject.org> wrote:
>
>> Since suspend to disk ("hibernate") requires swap, I'm pretty sure
we
>> should
>> recommend it by default for workstation. In order to make this as close to
>> 100% reliable as possible, this really should be as big as RAM -- but in
>> practical use (I dunno, 99% of the time?) it only needs to fit what's
>> actually used so can be much smaller.
>
> Blivet code has swap = mem + swap when hibernation=True, so for anything with
> less than 64GB RAM swap is effectively 2x RAM. [1]
> However, blivet has hibernation=False
Anaconda?
I haven't found any UI related to hibernation, but it's likely something that can
be leveraged with kickstart. Since anaconda uses blivet to setup storage at the backend,
by default it produces swap partitions per this:
if mem < two_GiB:
swap = 2 * mem
elif two_GiB <= mem < eight_GiB:
swap = mem
elif eight_GiB <= mem < sixtyfour_GiB:
swap = mem / 2
else:
swap = four_GiB
> so we get 1x which sometimes isn't enough. Further,
> anaconda doesn't set resume= boot parameter. So we're not currently
> configured to support suspend to disk as far as I can tell.
Got a link to where swapSuggestion() is called from?
https://git.fedorahosted.org/cgit/anaconda.git/tree/pyanaconda/ui/gui/spo...
line:784
blivet/blivet/devicelibs/swap.py
line:121
And 'grep -nr resume= anaconda/' on anaconda.git f21-branch returns nothing, and
my understanding is resume= boot parameter is required for suspend to disk. Perhaps
that's a pre-systemd requirement.
We can't say everyone's totally given up on this, there are related patches still
going into e.g. systemd as recently as 11 days ago:
https://www.mail-archive.com/systemd-devel@lists.freedesktop.org/msg22311...
Unless this changed recently
(during the F21 release cycle), this wasn't the experience of my last install.
No it goes back to at least F18 which is before blivet, but the equivalent file is
pyanaconda/storage/devicelibs/swap.py and it has the same outcome. Anything with 2-8GB
gets 1x without hibernation, and 2x with it enabled. And the only way I was able to figure
out how to enable it was to hand edit swap.py, when I did that and ran the GUI installer,
sure enough I get 2x RAM for swap.
Chris Murphy