From: Alex Hayward <xelah-pgsql@xelah.com>
To: Jim C. Nasby <jnasby@pervasive.com>
Cc: Scott Marlowe <smarlowe@g2switchworks.com>
Cc: Kenji Morishige <kenjim@juniper.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Best OS & Configuration for Dual Xeon w/4GB &
Date: Mon, 20 Mar 2006 19:46:13 +0000 (GMT)
Message-ID: <Pine.LNX.4.58.0603201944350.27598@sphinx.mythic-beasts.com> (raw)
In-Reply-To: <20060320144503.GR15742@pervasive.com>
References: <20060317221116.GA14661@juniper.net>
<1142636433.1141.33.camel@state.g2switchworks.com>
<20060320144503.GR15742@pervasive.com>
On Mon, 20 Mar 2006, Jim C. Nasby wrote:
> No, this is perfectly fine. Inactive memory in FreeBSD isn't the same as
> Free. It's the same as 'active' memory except that it's pages that
> haven't been accessed in X amount of time (between 100 and 200 ms, I
> think). When free memory starts getting low, FBSD will start moving
> pages from the inactive queue to the free queue (possibly resulting in
> writes to disk along the way).
>
> IIRC, Cache is the directory cache, and Buf is disk buffers, which is
> somewhat akin to shared_buffers in PostgreSQL.
I don't believe that's true. I'm not an expert in FreeBSD's VM internals,
but this is how I believe it works:
Active pages are pages currently mapped in to a process's address space.
Inactive pages are pages which are marked dirty (must be written to
backing store before they can be freed) and which are not mapped in to a
process's address. They're still associated with a VM object of some kind
- like part of a process's virtual address space or a as part of the cache
for a file on disk. If it's still part of a process's virtual address
space and is accessed a fault is generated. The page is then put back in
to the address mappings.
Cached pages are like inactive pages but aren't dirty. Then can be either
re-mapped or freed immediately.
Free pages are properly free. Wired pages are unswappable. Buf I'm not
sure about. It doesn't represent that amount of memory used to cache files
on disk, I'm sure of that. The sysctl -d description is 'KVA memory used
for bufs', so I suspect that it's the amount of kernel virtual address
space mapped to pages in the 'active', 'inactive' and 'cache' queues.
--
Alex Hayward
Seatbooker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: xelah-pgsql@xelah.com, jnasby@pervasive.com, smarlowe@g2switchworks.com, kenjim@juniper.net
Subject: Re: Best OS & Configuration for Dual Xeon w/4GB &
In-Reply-To: <Pine.LNX.4.58.0603201944350.27598@sphinx.mythic-beasts.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox