On 10/05/2007, at 4:05 PM, Amos Shapira wrote:

On 10/05/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

The recommendation of swap == 2x RAM is oldfashoned and may even be bad.
Googling will give you more than you ever wanted to know ...

IMHO you'd hardly ever want more than 512M of swap. If you did you'd know
and
understand why.

This is a busy server/desktop that has been running for months:

top - 10:02:21 up 63 days, 22:36, 29 users, load average: 0.06, 0.07,
0.07
Tasks: 202 total,   4 running, 198 sleeping,   0 stopped,   0 zombie
Cpu(s): 1.4%us, 3.3%sy, 0.0%ni, 94.1%id, 0.3%wa, 0.0%hi, 0.8% si,
0.0%st
Mem: 1027068k total, 1011776k used, 15292k free, 88764k buffers Swap: 1509988k total, 277160k used, 1232828k free, 383616k cached

James

PS the argument goes that a runaway process gets to use huge swap then
cripples the machine while on smaller swap it runs out of memory more
quickly
and gets killed. (Thats wot it said, I promise :-)


We've been through this argument before, dig through SLUG mailing list
archives.
The argument that I heard against large swap is that many swap pages also mean lots of main memory used up just to keep track of them and searching through them. On top of that - if your system uses more than around .5-1 Gig swap it's going to be slow like a dog anyway so you better increase your
RAM.

It depends on the VM system and the characteristics of the workload.

Some processes tend to load up large amounts of data, but their actual working set is only quite small. So it's better to page out this infrequently used data and free up that memory for use by other programs, or for use as cache. In this case the purpose of having a large amount of page space is to reduce the total amount of paging required.

It's only when your system is paging hard or swapping entire processes (because your working set does not fit in physical memory) that you should see a significant slowdown.

--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to