X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 9DC9F9FA38F for ; Tue, 13 Jun 2006 19:48:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 42177-02 for ; Tue, 13 Jun 2006 19:48:01 -0300 (ADT) 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 19A909FA1A8 for ; Tue, 13 Jun 2006 19:48:01 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id F285F56435; Tue, 13 Jun 2006 17:47:59 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Tue, 13 Jun 2006 17:47:59 -0500 Date: Tue, 13 Jun 2006 17:47:59 -0500 From: "Jim C. Nasby" To: Mischa Sandberg Cc: pgsql-performance@postgresql.org Subject: Re: Solaris shared_buffers anomaly? Message-ID: <20060613224759.GM34196@pervasive.com> References: <1150151282.14661.42.camel@tigger> <20060613000441.GI8588@kenobi.snowman.net> <20060613200810.GZ34196@pervasive.com> <448F3A6E.6080908@ca.sophos.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <448F3A6E.6080908@ca.sophos.com> 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:060613:mischa@ca.sophos.com::S4r5wCO148Xhn44D:00000000000000000 00000000000000000000000002Nm X-Hashcash: 1:20:060613:pgsql-performance@postgresql.org::OfD+EIMce0fiTd7o:00000 0000000000000000000000006QYe X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/223 X-Sequence-Number: 19580 On Tue, Jun 13, 2006 at 03:21:34PM -0700, Mischa Sandberg wrote: > Jim C. Nasby wrote: > ... > >Actually, in 8.1.x I've seen some big wins from greatly increasing the > >amount of shared_buffers, even as high as 50% of memory, thanks to the > >changes made to the buffer management code. ... > > Anyone else run into a gotcha that one of our customers ran into? > PG 7.4.8 running on Solaris 2.6, USparc w 4GB RAM. > Usually about 50 active backends. > (No reason to believe this wouldn't apply to 8.x). > > Initially shared_buffers were set to 1000 (8MB). > Then, we moved all apps but the database server off the box. > > Raised shared_buffers to 2000 (16MB). > Modest improvement in some frequent repeated queries. > > Raised shared_buffers to 16000 (128MB). > DB server dropped to a CRAWL. > > vmstat showed that it was swapping like crazy. > Dropped shared_buffers back down again. > Swapping stopped. What's sort_mem set to? I suspect you simply ran the machine out of memory. Also, Solaris by default will only use a portion of memory for filesystem caching, which will kill PostgreSQL performance. -- 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