Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Jun 2000 09:03:39 +0200 (CEST)
From:      Paul Herman <pherman@frenchfries.net>
To:        Kenneth Wayne Culver <culverk@wam.umd.edu>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   what is active/inactive memory (was Re: memory leak?)
Message-ID:  <Pine.BSF.4.21.0006300712200.224-100000@bagabeedaboo.security.at12.de>
In-Reply-To: <Pine.GSO.4.21.0006291423001.15091-100000@rac10.wam.umd.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/vmmeter.h>

 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0006300712200.224-100000>