Gentoo Archives: gentoo-user

From: Nikos Chantziaras <realnc@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: 32GB RAM and Swap
Date: Sat, 02 May 2020 02:18:07
Message-Id: r8il8j$2gs1$1@ciao.gmane.io
In Reply to: Re: [gentoo-user] 32GB RAM and Swap by tuxic@posteo.de
1 On 02/05/2020 05:06, tuxic@××××××.de wrote:
2 > as far as I know, the hibernation mechanism of the kernel uses swap
3 > as storage place for an RAM image.
4 >
5 > If you plan to use hibernation, I think you need swap space in the
6 > size of your RAM.
7
8 For this case you can set vm.swappiness=0 and still have a swap
9 partition. This disables swap for normal use but still has a swap
10 partition available for things like hibernation. Just create a .conf
11 file in /etc/sysctl.d/ (I use "/etc/sysctl.d/local.conf") with this in it:
12
13 vm.swappiness=0
14
15 This will apply the setting during boot. To set it for the currently
16 running session as well without having to reboot, execute:
17
18 sysctl vm.swappiness=0
19
20 as root.