From owner-freebsd-hackers Mon Jul 8 19: 7:32 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E6A5037B400 for ; Mon, 8 Jul 2002 19:07:29 -0700 (PDT) Received: from mail5.nc.rr.com (fe5.southeast.rr.com [24.93.67.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF4F543E42 for ; Mon, 8 Jul 2002 19:07:28 -0700 (PDT) (envelope-from bts@babbleon.org) Received: from i8k.babbleon.org ([66.57.86.84]) by mail5.nc.rr.com with Microsoft SMTPSVC(5.5.1877.757.75); Mon, 8 Jul 2002 21:58:09 -0400 Received: by i8k.babbleon.org (Postfix, from userid 111) id 78FC1BA05; Mon, 8 Jul 2002 21:58:03 -0400 (EDT) Content-Type: text/plain; charset="iso-8859-1" From: Brian T.Schellenberger To: Chuck Robey , FreeBSD Hackers List Subject: Re: swap & huge mem systems Date: Mon, 8 Jul 2002 21:58:03 -0400 X-Mailer: KMail [version 1.3] References: <20020708212522.N945-100000@april.chuckr.org> In-Reply-To: <20020708212522.N945-100000@april.chuckr.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20020709015803.78FC1BA05@i8k.babbleon.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Monday 08 July 2002 09:30 pm, Chuck Robey wrote: | Nowadays, what with the price of fast memory at such low levels, I'm | buying more memory than I really need, just because it's *so* cheap, the | price has gone up before, and it's possible (maybe likely) that next | year's popular new app will need the memory. I'm probably not alone in | doing this. It's causing me to wonder about how much swap to allocate. | | I used to follow the rule that I dedicate twice as much disk memory to | swap as I have RAM. Now, with my new system, I'm getting a gig of RAM, | but it seems ridiculous to dedicate 2G of disk to swap. Under these | conditions, what's the real bottom limit (if you have one gig of RAM) for | how much swap you can get away with? One Gig? Less? The bottom limit is zero. I ran with zero swap for a while; the only problem is that if an app goes nuts and starts allocating unlimited memory it gets *all* the memory before you can possibly intervene, so now I allocate some swap space just so that I can see problems in xosview before they happen. If any swap is ever allocated, then I know something's wrong and I have time to intervene before the system is completely locked up. I allocate 256M of swap. In fact, I think that a pretty good formula for a workstation is probably swap = MIN(2*RAM, 256M) unless you have really massive applications for multiple users or something. The only big drawback that I know of with this scheme is that if your system panics you can't get a kmem dump because there's not enough space to hold it. | | --------------------------------------------------------------------------- |- Chuck Robey | Interests include C & Java programming, FreeBSD, | chuckr@chuckr.org | electronics, communications, and signal processing. | | New Year's Resolution: I will not sphroxify gullible people into looking | up fictitious words in the dictionary. | --------------------------------------------------------------------------- |- | | | To Unsubscribe: send mail to majordomo@FreeBSD.org | with "unsubscribe freebsd-hackers" in the body of the message -- Brian, the man from Babble-On . . . . bts@babbleon.org (personal) http://www.babbleon.org http://www.eff.org http://www.programming-freedom.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message