From: peter@abbnm.com (Peter da Silva)
Subject: Re: Adding swap space, any limits on too much?
Date: Wed, 25 Feb 2004 18:54:52 +0000 (UTC) [thread overview]
Message-ID: <c1ir1s$2rcn$1@jeeves.eng.abbnm.com> (raw)
In-Reply-To: c1ihpn$1is1ml$1@ID-126742.news.uni-berlin.de
There's no such thing as "too much swap space", just "too little RAM".
There are all kinds of guidelines people promulgate about how much swap
space you should have for a certain amount of RAM, and they're all bogus.
Basically, allocate enough swap for the total amount of virtual memory you
expect to need. Buy enough RAM that you don't swap too much.
On Tru64, you need to decide whether you want to use lazy swap or greedy
swap. In greedy swap, every block of memory is assigned a preallocated
block of swap on the default swap partition. This means that you always
have swap to swap out to to make room, but you've got to have at least as
much swap as you have RAM and you have that much less VM. In lazy swap,
swap isn't allocated until you run out of physical memory.
I have not run into any situation where greedy swap was necessary (and in
saying this I am guaranteeing that someone will immediately call me ten
kinds of plain and fancy fool, and I welcome the feedback), but Digital...
I mean Compaq... HP... enables it by default. To turn it off and get an
extra gigabyte of VM, remove /sbin/swapdefault and reboot.
> I want to drop in a hard drive just for swap. It would be much larger than
> 2x the memory (I'm thinking of a spare 9 gig drive I have). This would be a
> simple solution versus repartioning existing drives.
I would recommend having a swap partition at least the size of memory on
each drive, and lazy allocation... this will give you the best performance
because the system will spread the swapped-out blocks among all the drives
so as to maximize the available bandwidth. If you have a few old 2G or 4G
drives around, and places to put them, use a few of them instead of a
single 9G... even if they're individually slower you're likely to get better
overall performance.
If you want to keep greedy allocation, you need to point /sbin/swapdefault
(it's a symbolic link) to the largest swap partition.
But remember the bottom line: virtual memory is determined by your total swap
space. Real memory is just cache for swap.
--
I've seen things you people can't imagine. Chimneysweeps on fire over the roofs
of London. I've watched kite-strings glitter in the sun at Hyde Park Gate. All
these things will be lost in time, like chalk-paintings in the rain. `-_-'
Time for your nap. | Peter da Silva | Har du kramat din varg, idag? 'U`
prev parent reply other threads:[~2004-02-25 18:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-25 16:16 Adding swap space, any limits on too much? d jO'nZ'
2004-02-25 18:54 ` Peter da Silva [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox