From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,d7a3a0ffc3f67020 X-Google-Attributes: gidfa528,public X-Google-ArrivalTime: 2004-02-25 11:11:02 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-09!supernews.com!nntp.cs.ubc.ca!cyclone.bc.net!newsfeed.stanford.edu!news-proxy.abbnm.com!newsboy.eng.abbnm.com!not-for-mail From: peter@abbnm.com (Peter da Silva) Newsgroups: comp.unix.tru64 Subject: Re: Adding swap space, any limits on too much? Date: Wed, 25 Feb 2004 18:54:52 +0000 (UTC) Organization: ABB Network Management Division Message-ID: References: NNTP-Posting-Host: grendel.eng.abbnm.com X-Trace: jeeves.eng.abbnm.com 1077735292 93591 198.178.0.150 (25 Feb 2004 18:54:52 GMT) X-Complaints-To: usenet@jeeves.eng.abbnm.com NNTP-Posting-Date: Wed, 25 Feb 2004 18:54:52 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Originator: peter@abbnm.com (Peter da Silva) Xref: archiver1.google.com comp.unix.tru64:11221 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`