From owner-freebsd-stable@FreeBSD.ORG Tue Apr 11 02:22:37 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3935716A402 for ; Tue, 11 Apr 2006 02:22:37 +0000 (UTC) (envelope-from anthony.maher@uts.edu.au) Received: from gaz.itd.uts.edu.au (gaz.itd.uts.EDU.AU [138.25.22.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 62BBF43D5C for ; Tue, 11 Apr 2006 02:22:35 +0000 (GMT) (envelope-from anthony.maher@uts.edu.au) Received: by gaz.itd.uts.edu.au (Postfix, from userid 1011) id 772E5214EC; Tue, 11 Apr 2006 12:21:55 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by gaz.itd.uts.edu.au (Postfix/Intermediary) with ESMTP id 419A7214F0; Tue, 11 Apr 2006 12:21:55 +1000 (EST) Received: from vimes (vimes.itd.uts.edu.au [138.25.243.34]) by gaz.itd.uts.edu.au (Postfix/Ingress) with ESMTP id 2CDFC214ED; Tue, 11 Apr 2006 12:21:55 +1000 (EST) Received: from [138.25.81.47] by postoffice.uts.edu.au (Sun Java System Messaging Server 6.2-4.03 (built Sep 22 2005)) with ESMTPS id <0IXJ00FUFD9LG760@postoffice.uts.edu.au>; Tue, 11 Apr 2006 12:22:33 +1000 (EST) Date: Tue, 11 Apr 2006 12:22:33 +1000 From: Tony Maher In-reply-to: <443B0A51.8040206@voidcaptain.com> To: Pete Slagle Message-id: <443B12E9.2040107@uts.edu.au> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en X-Enigmail-Version: 0.93.0.0 References: <1dbad3150604100913hff9fc4dsb125ea541675f992@mail.gmail.com> <20060410161713.GA48094@xor.obsecurity.org> <200604111048.09905.doconnor@gsoft.com.au> <443B0A51.8040206@voidcaptain.com> User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060306 Cc: freebsd-stable@freebsd.org Subject: Re: Maximum Swapsize X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2006 02:22:37 -0000 Pete Slagle wrote: > Daniel O'Connor wrote: > >> The old "swap size = 2x RAM" rule is no longer applicable unless you >> have a very special application. > > This "rule" always seemed counterintuitive to me anyway. > > When you have very limited physical RAM you need a lot of swap space. > When you have more than enough RAM you don't need any swap space at all. > For a given set of applications, as RAM increases you need less swap > space, not more. And vice versa. Provided the maximum "working set" of processes fits into RAM, you have sufficient RAM. Seldom used processes can be swapped out with minimal impact on the system. So as well as the "very special aplication" exception, the workload patterns (over a day) may allow for reduced RAM and utilize swap instead. In which case swap size should be sized to match. Maybe not important for a single machine but for multiple machines the cost of RAM memory adds up. -- tonym