From owner-freebsd-questions Fri Jun 30 0: 4: 5 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mail2.netcologne.de (mail2.netcologne.de [194.8.194.103]) by hub.freebsd.org (Postfix) with ESMTP id B0D1E37B841 for ; Fri, 30 Jun 2000 00:03:59 -0700 (PDT) (envelope-from pherman@frenchfries.net) Received: from bagabeedaboo.security.at12.de (dial-195-14-226-237.netcologne.de [195.14.226.237]) by mail2.netcologne.de (8.9.3/8.9.3) with ESMTP id JAA16413; Fri, 30 Jun 2000 09:03:57 +0200 (MET DST) Received: from localhost (localhost.security.at12.de [127.0.0.1]) by bagabeedaboo.security.at12.de (8.10.2/8.10.2) with ESMTP id e5U73dd00476; Fri, 30 Jun 2000 09:03:39 +0200 (CEST) Date: Fri, 30 Jun 2000 09:03:39 +0200 (CEST) From: Paul Herman To: Kenneth Wayne Culver Cc: freebsd-questions@FreeBSD.ORG Subject: what is active/inactive memory (was Re: memory leak?) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, 29 Jun 2000, Kenneth Wayne Culver wrote: > Hope I wasn't too mean :-) hehe... I think actually that we are covering > the vm system (at least in 2.2.5, kinda old, but I'm sure that knowing > 2.2.x's system, I could bring my self up to date on -CURRENT's vm > system) pretty soon in this class. I can't wait. Then be careful of those trick questions which just bit me :) After all, strictly speaking, there is no single concept in the kernel of what "active" memory is, which you can see in 1) vmmeter->v_active_count: the one top(1) reports (pages with a non-zero reference count.) 2) vmtotal->t_avm: reported by vmstat(8) (virtual pages used by programs running in the last 20 seconds) 3) vmtotal->t_arm: reported by systat(1) (resident pages used by programs running in the last 20 seconds) 1) and 3) are probably the most useful. In most cases, there is more memory available to you than just "Inactive + Cache + Free", becase some of the active memory (in the 1st sense) isn't really active (in the 3rd sense), as would be the case with the original poster's memory leak problem. This is clear to see with systat(1). So, be careful if you only have a multiple choice test!... It seems nowadays most people just use top, so if you need only one answer to "what is active/inactive memory" I guess 1) wins. :) "which objects can be found in the active/inactive queue" on the other hand, would be much easier to answer. -Paul. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message