On Tuesday 13 March 2007 09:09:06 P.V.Anthony wrote:
>
> Is swap really needed when there is a 4g of ram?

Yes.

That assumes that you will be compiling lots of large programs such as 
mozilla-firefox and Open Office. Let me tell you about my case:

I have 4 GB RAM and 2 x Opteron 246 CPUs, and I have three 2GB swap 
parttions: one each on 2 x IDE and 1 x SATA disks. I've told portage to use 
the /tmp directory for its work, and /tmp is mounted on tmpfs with a size 
of 6.5 GB. If /tmp occupancy outgrows the physical RAM, the kernel swaps 
part of it out to disk and carries on. Magic!

I run top in an X terminal when I want to monitor swap use. It shows me that 
the only time the swap gets used is when I'm compiling one of those large 
packages. Open Office, in particular, uses up to 5.7 GB of temporary space 
on my box, which is why I've set the /tmp limit to 6.5 GB. It may actually 
use more, but that's the most I've observed.

This box also spends nearly all its cycles on BOINC projects 
(http://boinc.berkeley.edu/), which not only ramps up the temp and noise, 
but of course uses a fair amount of space. All the same, I still don't see 
any use of swap except on those prodigious compiling jobs.

So, if you don't intend to compile large packages, you probably don't need 
swap; if you do, you do.

HTH.

-- 
Rgds
Peter Humphrey
Linux Counter 5290, Aug 93
-- 
gentoo-amd64@gentoo.org mailing list

Reply via email to