Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Questions re swap and hibernate interaction on 8 gig machine
Date: Tue, 22 Jun 2010 02:13:15
Message-Id: 4C201974.6060700@gmail.com
In Reply to: Re: [gentoo-user] Questions re swap and hibernate interaction on 8 gig machine by Bill Kenworthy
1 Bill Kenworthy wrote:
2 > << SNIP >>
3 > 5. Tune the kernel swappable parameter to either force most everything
4 > to swap to keep ram free or the other way to make it less likely to swap
5 > if thats whats needed. The current parameter is a compromise that works
6 > in most cases, but there are uses that benefit one way or the other.
7 >
8 > Lastly, to reiterate, disk space is cheap and putting aside 16Gb for
9 > swap is a small price to pay for stability - you may only need it
10 > occasionally, but then you will REALLY need it!
11 >
12 > Have fun!
13 >
14 > BillK
15 >
16 >
17
18 Just for notes, I have 2Gbs of ram. I have ~1Gb of swap. I don't think
19 I have ever seen it use over 100Mbs or so of swap since I built this
20 thing. Most of this depends on the programs you are using. If they use
21 more memory than you have, you need more swap. If not, then maybe not. ;-)
22
23 If you only want it to use swap when really needed, set it like this or
24 something close:
25
26 root@smoker-new / # cat /proc/sys/vm/swappiness
27 20
28 root@smoker-new / #
29
30 The lower the number, the more it tries not to use swap. The higher the
31 number, the more it will try to use swap. Since I rarely use more than
32 1Gb, compiling OOo may be a exception, I set mine to 20. My drives are
33 the old IDE and are not as fast as the new SATA drives. Use echo to
34 change that setting just in case you don't know already.
35
36 Hope that little bit of info helps. This is one of those "it depends"
37 situations. No matter what you set it up for, you will want to change
38 it later. :-)
39
40 Dale
41
42 :-) :-)