From owner-freebsd-stable@FreeBSD.ORG Thu May 18 16:56:49 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 74B0D16A5C0 for ; Thu, 18 May 2006 16:56:49 +0000 (UTC) (envelope-from dgilbert@daveg.ca) Received: from ox.eicat.ca (ox.eicat.ca [66.96.30.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1966F43D55 for ; Thu, 18 May 2006 16:56:48 +0000 (GMT) (envelope-from dgilbert@daveg.ca) Received: by ox.eicat.ca (Postfix, from userid 66) id 03DDC16143; Thu, 18 May 2006 12:56:48 -0400 (EDT) Received: by canoe.dclg.ca (Postfix, from userid 101) id 71A684AC45; Thu, 18 May 2006 12:56:54 -0400 (EDT) From: David Gilbert MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17516.42838.406274.724659@canoe.dclg.ca> Date: Thu, 18 May 2006 12:56:54 -0400 To: Tim Middleton In-Reply-To: <200605180733.07375.x@vex.net> References: <200605180733.07375.x@vex.net> X-Mailer: VM 7.17 under 21.4 (patch 19) "Constant Variable" XEmacs Lucid Cc: freebsd-stable@freebsd.org Subject: why the swapping 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: Thu, 18 May 2006 16:56:49 -0000 >>>>> "Tim" == Tim Middleton writes: Tim> Running 6.0-release, with 2 gig ram. Typical memory stats like Tim> this (from top): Tim> 626M Active, 1045M Inact, 204M Wired, 75M Cache, 112M Buf, 22M Tim> Free Tim> Under moderately high load i'm seeing a lot of swapping Tim> periodically through the day (and then load avg going way, way Tim> up, of course). I'm wondering why is there, with so much inactive Tim> memory, so much disk swapping? Tim> The machine runs some fairly intense stuff, such as squid, Tim> postgresql, and zope; but it seems to me there should be enough Tim> RAM to cover all of this without swapping. What am I missing? Am Tim> i misinterpretting the stats, and just not understanding how the Tim> vm works? Swapping in or out? Sswapping out is normal behaviour --- a background kernel thread sweeps memory to move it from active to inactive and inactive dirty pages are occaisionally sent to swap (or the file that's backing them). Swapping in is also normal when processes are launched. Remember that *BSD's "swap in" processes. I believe that mmap() calls also show up in the swap stats ... Swapping doesn't mean what it used to. What should worry you is a process that is blocked to a large degree on paging --- but that's not likely happening. Dave. -- ============================================================================ |David Gilbert, Independent Contractor. | Two things can be | |Mail: dave@daveg.ca | equal if and only if they | |http://daveg.ca | are precisely opposite. | =========================================================GLO================