X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 576CA9DCA02 for ; Tue, 27 Dec 2005 17:08:45 -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 88535-08 for ; Tue, 27 Dec 2005 17:08:46 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from flake.decibel.org (unknown [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 2146D9DCA24 for ; Tue, 27 Dec 2005 17:08:43 -0400 (AST) Received: by flake.decibel.org (Postfix, from userid 1001) id C034039834; Tue, 27 Dec 2005 15:08:44 -0600 (CST) Date: Tue, 27 Dec 2005 15:08:44 -0600 From: "Jim C. Nasby" To: Dan Austin Cc: Tom Lane , pgsql-admin@postgresql.org Subject: Re: Pgstat.tmp file activity Message-ID: <20051227210844.GP72143@pervasive.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 6.0-RELEASE amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.061 required=5 tests=[AWL=0.061] X-Spam-Score: 0.061 X-Spam-Level: X-Archive-Number: 200512/326 X-Sequence-Number: 20046 On Fri, Dec 23, 2005 at 04:50:32PM +1100, Dan Austin wrote: > > [...] > > Right, the file is fully written under a temp name, and then > > rename()'d > > This makes sense and is almost certainly not the cause of the problem. > Although there is a lot more data being written to that file than I > would have thought. > > One of Sun's kernel engineers has come up with a solution that seems to > have fixed the problem. Instead of increasing work_mem (which we still > might do) we've mounted a swapfs partition over the pg temp directory: > > # mount | grep pgsql_tmp > /export/data/pgsql/data/base/64920741/pgsql_tmp on swap [...] > > This has actually reduced the disk activity considerably. So far, the > blocking problem seems to have gone. > > Now to find some Postgres DBAs in Sydney to do some review / tuning of > our memory settings. :-) Note also that Solaris by default limits the amount of memory used for disk caching, which is Not Good for PostgreSQL. IIRC this can be changed with a sysctl, but I don't recall the details off-hand. -- 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