From owner-freebsd-questions Sun Oct 7 19:55: 6 2001 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-31-203-60.mmcable.com [65.31.203.60]) by hub.freebsd.org (Postfix) with SMTP id BF05837B40B for ; Sun, 7 Oct 2001 19:55:02 -0700 (PDT) Received: (qmail 21175 invoked by uid 100); 8 Oct 2001 02:55:02 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15297.5510.364245.686083@guru.mired.org> Date: Sun, 7 Oct 2001 21:55:02 -0500 To: swear@blarg.net (Gary W. Swearingen) Cc: questions@freebsd.org Subject: Re: ideal swap partition space... In-Reply-To: <21548426@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Gary W. Swearingen types: > "default" writes: > > I'm curious about setting up the amount of space for the swap partition... > > is there any ideal amount for FreeBSD? > Yes. None. Only under some conditions. If you want to get core dumps after a panic, then the dump device needs to be at least 64K bigger than memory. You might as well use that device for swap, as you can't use it for anything else while the system is running. If you can't afford enough real RAM to hold everything, you'll have to swap. According to the tuning man page, "The kernel's VM paging algorithms are tuned to perform best when there is at least 2x swap versus main memory." If you have two drives, putting memory size + 64KB of swap on each drive gives you enough to take dumps, takes advantage of the tuning of the VM system, and lets the system interleave swap - and is the minimum that will do all of that. Assuming you have enough RAM that you're not going to run out of virtual with that configuration. > Forget the two-times thing; it's needlessly simple, leaving out any > consideration of what software you want to run or how big your hard > disks are. It does have the benefit of requiring only a second of > thought as opposed to having to make estimates and predictions. The two-times rule dates from the days when all memory was backed by swap, and was the minimum amount required to get a core dump after a panic. I have no idea how much that has to do with the VM paging algorithms liking two times the main memory. But your main point here is correct - actually thinking about what you're going to be doing is more work, but gets better results, than blindly following rules of thumb. http://www.mired.org/home/mwm/ Q: How do you make the gods laugh? A: Tell them your plans. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message