How much swap?

Ian Petersen ispeters-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Wed Oct 25 15:36:08 UTC 2006


> No swap here.
[snip]
> Memory is cheap.

I've had similar thoughts, but some research turned up an interesting
counterpoint: memory is also fast (and disk is slow...).

Chances are, there are a bunch of processes on your system that spend
most of their time idling.  If you have no swap, these idle processes
_must_ reside in real RAM, which eats away at the amount of RAM that
can be used for caching and buffering.  On the other hand, if you
allow the kernel to swap out mostly-idle processes, it has more room
for these speed-enhancing uses of physical memory.

I think I found that discussion by looking for information regarding
/proc/sys/vm/swappiness.  Since then, I have always configured my
machines with swap.  Right now, I have 2GB physical memory and 4GB
swap in a file called /var/swap.  As for the size of the swap space, I
have no justification--I just followed the same "2 x RAM" folklore
that started this thread.

Just my 2 cents.

Ian

-- 
Tired of pop-ups, security holes, and spyware?
Try Firefox: http://www.getfirefox.com
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list