Gentoo Archives: gentoo-user

From: Alex Schuster <wonko@×××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Questions re swap and hibernate interaction on 8 gig machine
Date: Mon, 21 Jun 2010 23:06:41
Message-Id: 4C1FE75A.4070406@wonkology.org
In Reply to: [gentoo-user] Questions re swap and hibernate interaction on 8 gig machine by Walter Dnes
1 Walter Dnes writes:
2
3 > I just got a brand new custom-built 8 gig machine. There's an outfit
4 > in north Toronto that has MSI motherboards with PS/2 ports, so I can
5 > keep my genuine IBM PS/2 clickety-clack-keyboard; wooooohooooo. And the
6 > integrated Intel graphics chip has *BOTH VGA AND DIGITAL OUTPUTS*!
7
8 Hooray!
9
10 > Anyhow, I have 8 gigs of ram on the sytem (will obviously be 64-bit
11 > Gentoo) and I want to know how much swap I need. The general rule of
12 > thumb is twice the ram. In this case, it would be 16 gigs. I think
13 > that it may not need swap when up, unless I do some heavy duty stuff.
14
15 I think this rule does not scale with todays amounts of system ram. If
16 your system would need a similar amount of swap, swapping such a lot
17 would make things really really slow. You could probably live without
18 any swap, except for the purpose of hibernating to disk.
19
20 > My main concern about a swap partition is how much I need for
21 > hibernate-to-disk to work. Is there a rule about this, or should I
22 > simply allocate 16 gigs out of my terabyte drive, and play it safe?
23
24 The amount of swap needed is the amount RAM actually being used on your
25 system, compressed. Add the values of the 'used' fields of Mem and Swap
26 in your free -m output, divide by two, and that should be somewhere near
27 the amount you need. Maybe even less if tuxonice frees caches and
28 buffers. 4GB should be more than enough, I'd think.
29
30 But hibernation also works with swap files, so there is no need to set
31 the exact size already. And I suggest the usage of LVM, this way you can
32 freely and very easily change the swap size as you like. I never install
33 Linux without LVM these days, this flexibility makes things so much
34 easier, and I do not have to care much about partition sizes.
35
36 Wonko

Replies

Subject Author
Re: [gentoo-user] Questions re swap and hibernate interaction on 8 gig machine Bill Kenworthy <billk@×××××××××.au>