Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 May 2002 09:19:39 -0500 (CDT)
From:      Tod McQuillin <devin@spamcop.net>
To:        Erik Trulsson <ertr1013@student.uu.se>
Cc:        MikeM <MyRaQ@mgm51.com>, <freebsd-stable@freebsd.org>
Subject:   Re: Steadily increasing memory usage on a lightly loaded server
Message-ID:  <Pine.GSO.4.44.0205090915220.8544-100000@sysadmin>
In-Reply-To: <20020509140719.GA28169@student.uu.se>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 9 May 2002, Erik Trulsson wrote:

> The memory that is marked as 'Inactive' is also available for allocation
> just as the 'Free' memory. In practice you can just add together the
> 'Inactive' and the 'Free' memory to get the total of free memory.

Not quite -- if I understand it correctly, 'Inactive' is still part of a
running process's address space (or buffer cache) but has not had it's
page-used bit turned on since the last time it was cleared.

> The 'Inactive' memory contains data that *can* be reused (such as the
> code for programs that has recently been run) but that can also be
> thrown away without further notice if necessary.

I think you are thinking of 'Cache', not 'Inactive'.  Pages in the
inactive queue are still dirty, so they must be paged out before they can
be reused.  'Cache' pages are clean, so they can be reused at any time.

See http://www.freebsd.org/doc/en_US.ISO8859-1/articles/vm-design/x78.html
for details.

> I wouldn't worry about swap being used either. FreeBSD tends to write
> some things to swap before it is actually *necessary* to do it.

Yup.  Swap usage can actually be a good optimisation, not a sign of memory
shortage.
-- 
Tod McQuillin



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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