From owner-freebsd-current@FreeBSD.ORG Wed Jun 15 02:53:34 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0190416A41C for ; Wed, 15 Jun 2005 02:53:34 +0000 (GMT) (envelope-from dwhite@gumbysoft.com) Received: from carver.gumbysoft.com (carver.gumbysoft.com [66.220.23.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id E02FD43D49 for ; Wed, 15 Jun 2005 02:53:33 +0000 (GMT) (envelope-from dwhite@gumbysoft.com) Received: by carver.gumbysoft.com (Postfix, from userid 1000) id BFBCB72DDB; Tue, 14 Jun 2005 19:53:33 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by carver.gumbysoft.com (Postfix) with ESMTP id BE1F672DD9; Tue, 14 Jun 2005 19:53:33 -0700 (PDT) Date: Tue, 14 Jun 2005 19:53:33 -0700 (PDT) From: Doug White To: Brian Rogers In-Reply-To: <42AF7E63.6090908@truffula.net> Message-ID: <20050614195308.A24745@carver.gumbysoft.com> References: <42AF7E63.6090908@truffula.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-current@freebsd.org Subject: Re: Disk cache causing swap usage X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2005 02:53:34 -0000 On Tue, 14 Jun 2005, Brian Rogers wrote: > I have 1 GB of RAM and a 2 GB swap partition. Previously, I would > almost never see swap used (or at least no more than 4k used) under > normal use, but that appears to have changed recently. > > I am running > FreeBSD 6.0-CURRENT #3: Tue Jun 14 14:25:20 PDT 2005 > root@brian:/usr/obj/usr/src/sys/MYKERN > > My testcase for this problem is to run > dd if=bigfile of=/dev/null > and watch the free space drop. I expect that to happen, as the disk > cache holds onto what has been read. But when free memory runs out, it > starts paging out to the swap file, when it should have plenty of old > cache to throw out first before resorting to the swap file. I'm pretty > sure it didn't do this before, but I ran into the 20050609 issue in > UPDATING when trying to run top on an old kernel to test it. This is a known bug in the bufcache work. phk is aware but an extra prod wouldn't hurt :) -- Doug White | FreeBSD: The Power to Serve dwhite@gumbysoft.com | www.FreeBSD.org