From owner-freebsd-questions@FreeBSD.ORG Tue Feb 8 22:28:02 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0D4B16A4CE for ; Tue, 8 Feb 2005 22:28:02 +0000 (GMT) Received: from av9-1-sn1.fre.skanova.net (av9-1-sn1.fre.skanova.net [81.228.11.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6ACED43D41 for ; Tue, 8 Feb 2005 22:28:01 +0000 (GMT) (envelope-from ertr1013@student.uu.se) Received: by av9-1-sn1.fre.skanova.net (Postfix, from userid 502) id 6BE2F37E52; Tue, 8 Feb 2005 23:28:00 +0100 (CET) Received: from smtp2-2-sn2.hy.skanova.net (smtp2-2-sn2.hy.skanova.net [81.228.8.178]) by av9-1-sn1.fre.skanova.net (Postfix) with ESMTP id 5E5C537E42 for ; Tue, 8 Feb 2005 23:28:00 +0100 (CET) Received: from falcon.midgard.homeip.net (h201n1fls24o1048.bredband.comhem.se [212.181.162.201]) by smtp2-2-sn2.hy.skanova.net (Postfix) with SMTP id 0B1B637E4E for ; Tue, 8 Feb 2005 23:27:59 +0100 (CET) Received: (qmail 37028 invoked by uid 1001); 8 Feb 2005 22:27:59 -0000 Date: Tue, 8 Feb 2005 23:27:59 +0100 From: Erik Trulsson To: Pat Maddox Message-ID: <20050208222759.GA29360@falcon.midgard.homeip.net> Mail-Followup-To: Pat Maddox , freebsd-questions@freebsd.org References: <810a540e050208133310333144@mail.gmail.com> <20050208213612.GA29063@falcon.midgard.homeip.net> <810a540e050208134479b4e774@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <810a540e050208134479b4e774@mail.gmail.com> User-Agent: Mutt/1.5.6i cc: freebsd-questions@freebsd.org Subject: Re: Inactive memory X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Feb 2005 22:28:03 -0000 On Tue, Feb 08, 2005 at 02:44:39PM -0700, Pat Maddox wrote: > Alright, that lets me know that it's not an entirely bad thing. It > does say, however, that it's fine as long as the free memory isn't > REALLY low. It did get down to 13MB though, as I said. Don't worry. 13MB is not what I would consider as "REALLY low" (ok, with 1GB RAM maybe it is) but anyway, the only thing to worry about is if the system starts to swap very often - that means you need more memory. > > So now I understand that it's alright for the free memory to be low. > I don't understand how the inactive, cache, and buffered memory are > used though. When a process uses up all the free memory, does it then > use some from inactive, or does it use swap? Memory normally moves along the following path: Wired -> Active -> Inactive -> Cached -> Free and then when it gets allocated and used it moves back to Wired. The difference between the categories is mainly that "Inactive" and "Cached" memory still contains data that the system might be able to reuse, while "Free" memory is completely free and unused. In order to use Cached or Inactive memory it might need to be flushed first, with Inactive probably being dirty and Cached probably not. ("Active" memory is almost certainly dirty and is therefore somewhat more expensive to reuse. If you didn't understand the preceding paragraph, don't worry. It is not really important to understand. For most purposes you should just consider all of "Free", "Cached", and "Inactive" to be free memory that is available for allocation. > > > On Tue, 8 Feb 2005 22:36:12 +0100, Erik Trulsson wrote: > > On Tue, Feb 08, 2005 at 02:33:14PM -0700, Pat Maddox wrote: > > > I've always got a lot of inactive memory on my machine, around 520MB > > > or so. While doing a portupgrade, the free memory dropped to around > > > 13MB. I'm just curious what exactly the inactive memory is. Will the > > > OS use the inactive memory before dipping into swap? Or is that > > > memory off limits now? If so, is there any way to free it up? I've > > > got 1GB total on the machine. > > > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/misc.html#TOP-FREEMEM -- Erik Trulsson ertr1013@student.uu.se