From owner-freebsd-arch@FreeBSD.ORG Sun Aug 3 17:20:14 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0531337B401 for ; Sun, 3 Aug 2003 17:20:14 -0700 (PDT) Received: from HAL9000.homeunix.com (ip114.bella-vista.sfo.interquest.net [66.199.86.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id 586EF43FBF for ; Sun, 3 Aug 2003 17:20:13 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.9/8.12.9) with ESMTP id h740K51K006331; Sun, 3 Aug 2003 17:20:05 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.9/8.12.9/Submit) id h740K3Id006330; Sun, 3 Aug 2003 17:20:04 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Sun, 3 Aug 2003 17:20:03 -0700 From: David Schultz To: "Dag-Erling =?us-ascii:iso-8859-1?Q?Sm=F8rgrav?=" Message-ID: <20030804002003.GA5823@HAL9000.homeunix.com> Mail-Followup-To: "Dag-Erling =?us-ascii:iso-8859-1?Q?Sm=F8rgrav?=" , Poul-Henning Kamp , Peter Jeremy , arch@freebsd.org References: <6955.1059728599@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: Peter Jeremy cc: Poul-Henning Kamp cc: arch@FreeBSD.ORG Subject: Re: headsup: swap_pager.c X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Aug 2003 00:20:14 -0000 On Fri, Aug 01, 2003, Dag-Erling Smrgrav wrote: > "Poul-Henning Kamp" writes: > > The thing you overlook is that often when things gets paged out, the > > system is short on memory and therefore more likely to not do anything > > productive, whereas when things gets paged in, there are a better chance > > of some other process being able to use the CPU time productively. > > If we did predictive pageouts like some of the "serious" mainfram OS's > > this would be less true. > > How hard would it be to get the kernel to write the pages "most likely > to be swapped out" to swap in the idle loop, to save time if / when > they actually need to be swapped out later? > > I thought we already did this to some extent (ref. FAQ 16.1), but > apparently I was wrong? FreeBSD already does that. ;-) You can control the number of clean pages that it keeps around with the sysctls vm.v_cache_{min,max}, but you shouldn't need to tune anything to get good performance. FWIW, the stuff phk is working on is in a different area; it has to do with what swap device your pages wind up on after the VM system has already decided to write them out.