Re: Best OS & Configuration for Dual Xeon w/4GB &

From: Alex Hayward <xelah-pgsql(at)xelah(dot)com>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>, Kenji Morishige <kenjim(at)juniper(dot)net>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Best OS & Configuration for Dual Xeon w/4GB &
Date: 2006-03-20 19:46:13
Message-ID: Pine.LNX.4.58.0603201944350.27598@sphinx.mythic-beasts.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Miguel 2006-03-20 20:52:45 Re: Best OS & Configuration for Dual Xeon w/4GB & Adaptec
Previous Message Merlin Moncure 2006-03-20 19:44:44 Re: 1 TB of memory