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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 20, 2006 at 07:46:13PM +0000, Alex Hayward wrote:
> 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

Actually, a page that is in the inactive queue *may* be dirty. In fact,
if you start with a freshly booted system (or one that's been recently
starved of memory) and read in a large file, you'll see the inactive
queue grow even though the pages haven't been dirtied.

> - 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
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match
> 

-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@xxxxxxxxxxxxx
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux