Gentoo Archives: gentoo-amd64

From: Peter Humphrey <prh@××××××××××.uk>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Is swap need when there is 4g of ram?
Date: Tue, 13 Mar 2007 18:06:35
Message-Id: 200703131804.08407.prh@gotadsl.co.uk
In Reply to: [gentoo-amd64] Is swap need when there is 4g of ram? by "P.V.Anthony"
1 On Tuesday 13 March 2007 09:09:06 P.V.Anthony wrote:
2 >
3 > Is swap really needed when there is a 4g of ram?
4
5 Yes.
6
7 That assumes that you will be compiling lots of large programs such as
8 mozilla-firefox and Open Office. Let me tell you about my case:
9
10 I have 4 GB RAM and 2 x Opteron 246 CPUs, and I have three 2GB swap
11 parttions: one each on 2 x IDE and 1 x SATA disks. I've told portage to use
12 the /tmp directory for its work, and /tmp is mounted on tmpfs with a size
13 of 6.5 GB. If /tmp occupancy outgrows the physical RAM, the kernel swaps
14 part of it out to disk and carries on. Magic!
15
16 I run top in an X terminal when I want to monitor swap use. It shows me that
17 the only time the swap gets used is when I'm compiling one of those large
18 packages. Open Office, in particular, uses up to 5.7 GB of temporary space
19 on my box, which is why I've set the /tmp limit to 6.5 GB. It may actually
20 use more, but that's the most I've observed.
21
22 This box also spends nearly all its cycles on BOINC projects
23 (http://boinc.berkeley.edu/), which not only ramps up the temp and noise,
24 but of course uses a fair amount of space. All the same, I still don't see
25 any use of swap except on those prodigious compiling jobs.
26
27 So, if you don't intend to compile large packages, you probably don't need
28 swap; if you do, you do.
29
30 HTH.
31
32 --
33 Rgds
34 Peter Humphrey
35 Linux Counter 5290, Aug 93
36 --
37 gentoo-amd64@g.o mailing list