From owner-freebsd-questions Tue Nov 27 21:20:19 2001 Delivered-To: freebsd-questions@freebsd.org Received: from lists.blarg.net (lists.blarg.net [206.124.128.17]) by hub.freebsd.org (Postfix) with ESMTP id C99D737B405 for ; Tue, 27 Nov 2001 21:20:16 -0800 (PST) Received: from thig.blarg.net (thig.blarg.net [206.124.128.18]) by lists.blarg.net (Postfix) with ESMTP id 50D0BBD1D; Tue, 27 Nov 2001 21:20:16 -0800 (PST) Received: from localhost.localdomain ([206.124.139.115]) by thig.blarg.net (8.9.3/8.9.3) with ESMTP id VAA09325; Tue, 27 Nov 2001 21:20:15 -0800 Received: (from jojo@localhost) by localhost.localdomain (8.11.6/8.11.3) id fAS5HWg10780; Tue, 27 Nov 2001 21:17:32 -0800 (PST) (envelope-from swear@blarg.net) To: David Kirchner Cc: Mike Meyer , Anthony Atkielski , Subject: Re: Calculating swap file size References: <20011127170344.W15780-100000@localhost> From: swear@blarg.net (Gary W. Swearingen) Date: 27 Nov 2001 21:17:31 -0800 In-Reply-To: <20011127170344.W15780-100000@localhost> Message-ID: Lines: 34 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 David Kirchner writes: > On Tue, 27 Nov 2001, Mike Meyer wrote: > > > The VM algorithms aren't quite as efficient if you have less than 2x > > ram size. > > I've read this in places before (man tuning I believe), but I haven't yet > found the reason for it. I read through the 4.4BSD book's chapter on > memory management but I don't recall seeing anything about it. Is there a > place where this is documented further? Don't read more out of tuning(7) than was written into it. It says: The kernel's VM paging algorithms are tuned to perform best when there is at least 2x swap versus main memory. Configuring too little swap can lead to inefficiencies in the VM page scanning code You shouldn't care about the performance of VM algorithms or the inefficiencies of the VM code. Maybe the VM designer does, but you shouldn't, at least for sizing swap partitions. You should care only about the performance (ie, speed) of the VM code. These are different things. Man page tuning(7) doesn't imply that a 64 MB RAM system will swap 10 MB faster with 128 MB swap than with 64 MB swap (and I wouldn't believe it if it did, without some evidence or explanation.) Actually I don't think it even implies that it would be more efficient. I'm gusssing that it might swap 64 MB of 128 MB swap less than twice as slowly than 32 MB of 64 MB swap (or some such thing that doesn't directly impact user swap sizing). That's the only kind of "algorithm performance tuning" neccessary to justify the broad statements of tuning(7). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message