From owner-freebsd-performance@FreeBSD.ORG Thu Jul 24 10:39:14 2003 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF5E437B401 for ; Thu, 24 Jul 2003 10:39:14 -0700 (PDT) Received: from smtp.k12us.com (smtp.k12us.com [65.112.222.15]) by mx1.FreeBSD.org (Postfix) with SMTP id 499E243FDF for ; Thu, 24 Jul 2003 10:39:12 -0700 (PDT) (envelope-from csw@k12hq.com) Received: (qmail 39300 invoked by uid 1001); 24 Jul 2003 17:39:10 -0000 Date: Thu, 24 Jul 2003 13:39:10 -0400 From: Christopher Weimann To: Terry Lambert Message-ID: <20030724173910.GA9364@smtp.k12us.com> References: <200307191818.13516.paul@pathiakis.com> <20030720110939.GN24507@perrin.int.nxad.com> <20030720164237.GC55392@nasby.net> <20030722143449.B10666@smtp.k12us.com> <3F1E297E.70962D97@mindspring.com> <20030723144700.GL55392@nasby.net> <3F1F82DD.966C7F2F@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F1F82DD.966C7F2F@mindspring.com> User-Agent: Mutt/1.5.4i X-AntiVirus: scanned for viruses by AMaViS 0.2.1 (http://amavis.org/) cc: Sean Chittenden cc: freebsd-database@freebsd.org cc: freebsd-performance@freebsd.org cc: Paul Pathiakis cc: "Jim C. Nasby" Subject: Re: Tuning for PostGreSQL Database X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2003 17:39:15 -0000 On Wed 07/23/2003-11:55:25PM -0700, Terry Lambert wrote: > > > The question I have is: can pages in the inactive queue be used as disk > > cache? > > The answer is "yes, they can be reactivated and written to before > they are flushed if soft updates is enabled" and "yes, they can be > reactivated and read (but not written) to before they are flushed > if soft updates is not enabled". > > In general, this only happens for data pages, which is to say, the > pages containing user file data. Pages containing FS metadata are > specifically considered as "write through" or "virtually write > through". > > It doesn't happen for data pages, if they are explicitly fsync'ed > to ensure write ordering is guaranteed. > So if PostGreSQL uses fsync when writing ( which I think is only true on the write-ahead logs at this point ) that data will NOT wind up in the cache. Anything that PostGreSQL reads should wind up in the cache? #uname -r 4.7-RELEASE-p3 # top -b | head -5 last pid: 58622; load averages: 1.96, 1.67, 1.47 up 2+12:59:15 13:31:39 130 processes: 6 running, 124 sleeping Mem: 348M Active, 2628M Inact, 438M Wired, 155M Cache, 380M Buf, 76M Free Swap: 4096M Total, 28K Used, 4096M Free The 2628M Inact is likley to be acting as cache? Basically I should stop worrying about this :)