Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Disabling swap & mounting /tmp on tmpfs = new standard?
Date: Sat, 30 May 2009 23:46:23
Message-Id: 4A21C548.4020401@gmail.com
In Reply to: Re: [gentoo-user] Re: Disabling swap & mounting /tmp on tmpfs = new standard? by Mick
1 Mick wrote:
2 > On Saturday 30 May 2009, Nikos Chantziaras wrote:
3 >
4 >> Grant wrote:
5 >>
6 >>> I recently disabled swap and mounted /tmp on tmpfs for a netbook since
7 >>> the SSD is so slow, and now I'm wondering if that would be a wise move
8 >>> for all of my Gentoo systems. In what type of situation would it be a
9 >>> bad idea?
10 >>>
11 >> Instead of disabling swap, just make it small (like 32MB or something;
12 >> whatever the smallest allowable partition size is). The kernel needs
13 >> swap to operate optimally, even if it's extremely small. Just make sure
14 >> it's there.
15 >>
16 >
17 > Hmm, on this old box I noticed swap was using more than 135,000K earlier today
18 > as I was emerging xulrunner and ImageMagick. I think that the size of swap
19 > is relevant to the memory size that the box in question has. Not all
20 > machines have found their way to 2G RAM yet ... ;)
21 >
22 >
23
24 Don't forget that you can set swapiness too. This is set in
25 /etc/sysctl.conf and for mine I have this:
26
27 vm.swappiness = 30
28
29 The lower the number, the less chance of it using swap. If it is set to
30 90, it will use a lot of swap which is fine if you have little ram or a
31 really fast drive. If it is set to 30, then it will not use swap unless
32 it is basically out of ram.
33
34 With the setting of 30, mine uses swap when compiling OOo or some other
35 large package or if I am opening a TON of pics. Otherwise, swap is at 0
36 or close to it even after being up a long time. I have 2Gbs here tho.
37 Your mileage may vary.
38
39 Dale
40
41 :-) :-)

Replies