Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Cc: Walter Dnes <waltdnes@××××××××.org>
Subject: Re: [gentoo-user] Questions re swap and hibernate interaction on 8 gig machine
Date: Mon, 21 Jun 2010 23:04:00
Message-Id: 201006220017.27819.alan.mckinnon@gmail.com
In Reply to: [gentoo-user] Questions re swap and hibernate interaction on 8 gig machine by Walter Dnes
1 On Tuesday 22 June 2010 00:04:14 Walter Dnes wrote:
2 > I just got a brand new custom-built 8 gig machine. There's an outfit
3 > in north Toronto that has MSI motherboards with PS/2 ports, so I can
4 > keep my genuine IBM PS/2 clickety-clack-keyboard; wooooohooooo. And the
5 > integrated Intel graphics chip has *BOTH VGA AND DIGITAL OUTPUTS*!
6 >
7 > Anyhow, I have 8 gigs of ram on the sytem (will obviously be 64-bit
8 > Gentoo) and I want to know how much swap I need. The general rule of
9 > thumb is twice the ram. In this case, it would be 16 gigs. I think
10 > that it may not need swap when up, unless I do some heavy duty stuff.
11 > My main concern about a swap partition is how much I need for
12 > hibernate-to-disk to work. Is there a rule about this, or should I
13 > simply allocate 16 gigs out of my terabyte drive, and play it safe?
14
15 With 8G of ram, you will likely never ever use a single bit of swap for the
16 entire life of the machine.
17
18 There is no such thing as a decent rule of thumb for how much swap. What does
19 exist, is the following:
20
21 "What intelligent-sounding (but actually dumb) answer can we give to this
22 infernal question that keeps coming up that will make the user shut up and go
23 away satisfied (regardless of the correctness and workability of the answer)?"
24
25 That answer is, of course, "Twice your RAM". Said answer is also, bullshit[1].
26 If I said "42!" it would have made as much semantic sense.
27
28 Your swap needs depend totally on your usage. There is no rule of thumb[2].
29
30 [1] Long ago when 386's were all the rage, 2 X RAM did make some sense. You do
31 not have a 386 and 2 X RAM does not make sense with the hardware you have.
32 [2] If you plan to suspend to disk you will need a certain minimum amount of
33 swap for that. But you already know that, so I'd create that minimum amount.
34
35
36 --
37 alan dot mckinnon at gmail dot com