X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 92AC09DC81D for ; Tue, 21 Mar 2006 06:23:37 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 21551-10 for ; Tue, 21 Mar 2006 06:23:38 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id D9A689DC84A for ; Tue, 21 Mar 2006 06:23:34 -0400 (AST) Received: by noel.decibel.org (Postfix, from userid 1001) id E10F256427; Tue, 21 Mar 2006 04:23:36 -0600 (CST) Received: (hashcash-sendmail, from uid 1001); Tue, 21 Mar 2006 04:23:36 -0600 Date: Tue, 21 Mar 2006 04:23:36 -0600 From: "Jim C. Nasby" To: Alex Hayward Cc: Scott Marlowe , Kenji Morishige , pgsql-performance@postgresql.org Subject: Re: Best OS & Configuration for Dual Xeon w/4GB & Message-ID: <20060321102335.GC15742@pervasive.com> References: <20060317221116.GA14661@juniper.net> <1142636433.1141.33.camel@state.g2switchworks.com> <20060320144503.GR15742@pervasive.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060321:xelah-pgsql@xelah.com::F8HYDDCkIFHNygs1:0000000000000000 000000000000000000000000272/ X-Hashcash: 1:20:060321:smarlowe@g2switchworks.com::N2PN+7sVQD0GWOK9:00000000000 0000000000000000000000001t0H X-Hashcash: 1:20:060321:kenjim@juniper.net::fpl5Sv8tPjri6UxL:0000000000000000000 0000000000000000000000000PBe X-Hashcash: 1:20:060321:pgsql-performance@postgresql.org::x6qxTEepJ4r6eH43:00000 0000000000000000000000007UWc X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.108 required=5 tests=[AWL=0.108] X-Spam-Score: 0.108 X-Spam-Level: X-Archive-Number: 200603/374 X-Sequence-Number: 17811 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@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461