From owner-freebsd-isp@FreeBSD.ORG Wed Dec 10 00:41:31 2003 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DBE4B16A4CE for ; Wed, 10 Dec 2003 00:41:31 -0800 (PST) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 78B0843D13 for ; Wed, 10 Dec 2003 00:41:29 -0800 (PST) (envelope-from silby@silby.com) Received: (qmail 32516 invoked from network); 10 Dec 2003 08:41:28 -0000 Received: from niwun.pair.com (HELO localhost) (209.68.2.70) by relay.pair.com with SMTP; 10 Dec 2003 08:41:28 -0000 X-pair-Authenticated: 209.68.2.70 Date: Wed, 10 Dec 2003 02:41:26 -0600 (CST) From: Mike Silbersack To: nbari@unixmexico.com In-Reply-To: <20571.148.243.211.1.1071036438.squirrel@mail.unixmexico.com> Message-ID: <20031210023427.T14579@odysseus.silby.com> References: <20571.148.243.211.1.1071036438.squirrel@mail.unixmexico.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-isp@freebsd.org cc: freebsd-hackers@freebsd.org Subject: Re: adding more ram X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2003 08:41:32 -0000 On Wed, 10 Dec 2003 nbari@unixmexico.com wrote: > Hi all. > > I have a server with 1GB of RAM and a swap partition of 2GB i will upgrade > the memory server to 2GB so my questions are: > > should i fix the swap partition to have now 4GB of space ? > > what other changes do i have to make to my system after adding more ram ? > > regards. Dan's advice seems good; swapping more than a gig of data would be awful. I'm replying because I want to answer your real question. The notion of swap = 2 x ram is an old one, and is no longer applicable. (Some) older VM systems used very simplistic swapping mechanisms, which required entire processes to be swapped, thereby requiring large amounts of swap space. FreeBSD (and other modern OSes) page out to the swap file in increments of 4K pages, and do so in a flexible manner. As a result, you should always have *some* swap space to handle overload cases, but it's not necessary to keep any specific ram to swap ratio. (Actually, the term "swapping" is still used inside the FreeBSD kernel, but it only applies to paging out the last 20K or so of a process's memory.) Now, to contradict myself, there *is* a reason that you might wish to have a larger swapfile. Taking a crashdump requires that the swap file must be of the size RAM + 64K or so. Hence, your present swap file might be slightly too small to take a crashdump once you upgrade to 2G ram. Whether this is an issue for you or not depends on how often your machine crashes and whether you wish to debug it. :) Mike "Silby" Silbersack