Return to BSD News archive
Newsgroups: comp.unix.bsd Path: sserve!manuel!munnari.oz.au!mips!mips!darwin.sura.net!mojo.eng.umd.edu!pandora.pix.com!stripes From: stripes@pix.com (Josh Osborne) Subject: Re: swap allocation strategies Message-ID: <Bt8Dqp.Btq@pix.com> Keywords: swap Sender: news@pix.com (The News Subsystem) Nntp-Posting-Host: pandora.pix.com Organization: Project GLUE, Merriversity of Uniland, College Purgatory References: <19274@ector.cs.purdue.edu> Date: Wed, 19 Aug 1992 12:37:36 GMT Lines: 50 In article <19274@ector.cs.purdue.edu> yeh@cs.purdue.EDU (Wei Jen Yeh) writes: [...] > 1. Should I allocate another 64mb of swap region or two 32mb ones? If you can put the 2 swaps on diffrent drives, and one drive isn't way slower or under way more use then it should be faster then 1 big swap. I don't know of any speed advantage to using 2 swaps on one drive (however for config testing it is handy to disable one and see if you can get away with it, it's also nice if you can still run your system if a swap area gets a bad block that the disk & OS won't deal with). > 2. Where should they go? to the boot drive or the secondary drive? Diffrent drives. > 3. Should I allocate a slice for the swap or use a swap file instead? Swap files are normally slower since they go through the normal filesystem. I think they were invented for swapping over NFS and to make it easy to expand swap in a pinch. > 4. Should I reinstall the system and start w/ a single 128 mb of main swap? > (if it's better to have a single swap region.), or four slices of > size 32mb? If you have 4 disks for the four swaps that's best (subject to previously listed objections). >Any suggestions? > >If it matters, I'm running Dell's sVr4 Issue 2.1. Thanks. Think of where your drive heads will be most offen. If they will be page-faulting executables in get the swap close to the executables. If they will be close to /tmp (assuming you have no MFS/TMPFS) put the swap close to /tmp. If it will be reading large user files sequentally, put it close to the user ppartition/slice. If it will be close to 2 things put it in between. If you have iostat, or something that can tell you which slice/partition is being accesses (sar might be able to) try watching it run durning your normmal load... Buy solid-state swap devices :-) Buy multiple small fast swap disks :-) -- stripes@pix.com "Security for Unix is like Josh_Osborne@Real_World,The Multitasking for MS-DOS" "The dyslexic porgramer" - Kevin Lockwood We all agree on the necessity of compromise. We just can't agree on when it's necessary to compromise. - Larry Wall