From owner-freebsd-questions@FreeBSD.ORG Wed Mar 7 13:01:23 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 248D6106566C for ; Wed, 7 Mar 2012 13:01:23 +0000 (UTC) (envelope-from jb.1234abcd@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id D6BFC8FC14 for ; Wed, 7 Mar 2012 13:01:22 +0000 (UTC) Received: by yenl9 with SMTP id l9so2999072yen.13 for ; Wed, 07 Mar 2012 05:01:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=QngU+k9YhN7ojF6+Z5Y2PF7YgJ6oftjHaVcNeaNUsJc=; b=YEGzpjxKo/718vsjcDm825EK7XS8QjqVDIs4e5uK00syjTXMR/JImNTXvGTw/kwchA OciowcxY0MkGjQWBMQNpT8pgg+8e8Jc0sBcrX6lY6nAF3KjkoXEUvOoVZivc8Kl+aw4J 8nlwPNrQwIipPkBS76S49OqlfdmoM/pu/1BWaddYyGM0oPyv+OyAhSnqxBb04186oYlS tYgph9TJeeNUqzWWwpkIQFmjyLwHYaEQDJH3Q8xm8ESEbyI9hXr9asIR0n73AFmPu0/X nINTPguC/EHT+bcwWBTACyHP1zJaj4Iwmioa8I3owyIz1TNp1JtUXYzXv5sTiINMK3/6 oEGw== MIME-Version: 1.0 Received: by 10.236.189.9 with SMTP id b9mr4216738yhn.48.1331123639149; Wed, 07 Mar 2012 04:33:59 -0800 (PST) Received: by 10.146.232.12 with HTTP; Wed, 7 Mar 2012 04:33:59 -0800 (PST) Date: Wed, 7 Mar 2012 13:33:59 +0100 Message-ID: From: J B To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: FreeBSD 8.2 - active plus inactive memory leak!? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Mar 2012 13:01:23 -0000 On Wed, 07 Mar 2012 10:23:38 +0200, Konstantin Belousov wrote: > On Wed, Mar 07, 2012 at 12:36:21AM +0000, Luke Marsden wrote: > ... >> I'm trying to confirm that, on a system with no pages swapped out, that >> the following is a true statement: >> >> a page is accounted for in active + inactive if and only if it >> corresponds to one or more of the pages accounted for in the >> resident memory lists of all the processes on the system (as >> per the output of 'top' and 'ps') > No. > > The pages belonging to vnode vm object can be active or inactive or > cached but not mapped into any process address space. I wonder if some ideas by Denys Vlasenko contained in this thread http://comments.gmane.org/gmane.linux.redhat.fedora.devel/157706 would be useful ? ... "Today, I'm looking at my process list, sorted by amount of dirtied pages (which very closely matches amount of malloced and used space - that is, malloced, but not-written to memory areas are not included). This is the most expensive type of pages, they can't be discarded. If we would be in memory squeeze, kernel will have to swap them out, if swap exists, otherwise kernel can't do anything at all." ... "Note that any shared pages (such as glibc) are not freed this way; also, non-mapped pages (such as large, but unused malloced space, or large, but unused file mappings) also do not contribute to MemFree increase." jb